Skip to content

Instantly share code, notes, and snippets.

@nickname55
Created April 9, 2021 18:42
Show Gist options
  • Save nickname55/5604523a62551877020e99148a3d3468 to your computer and use it in GitHub Desktop.
Save nickname55/5604523a62551877020e99148a3d3468 to your computer and use it in GitHub Desktop.
неправильная выгрузка в CSV поля Customer Request Type
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObjectByName("Customer Request Type")
def cFieldValue = issue.getCustomFieldValue(cField).toString()
switch(cFieldValue) {
case "a1sd/e5da0e6d-41ef-4e3a-90f6-a47aee7779c4":
return "null";
break;
case "a1sd/af955697-3f94-44e5-a59f-a3f54cc4bedf":
return "Critical";
break;
case "a1sd/118093b6-fcf2-4050-bd0f-cf5644d316c5":
return "Low";
break;
case "a1sd/8802daa4-e454-4119-835b-bb882f264596":
return "High";
break;
case "a1sd/65cf1a39-e9cd-416f-b81b-09be5518e454":
return "Future Request";
break;
default:
return cFieldValue;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment