1). How to read the custom field value ?
2). How to make issue type ?
3). How to link the issue type ?
Please help me with groovy script for above requirement.
Hi Deller,
1) Here is a code to get custom field value:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.fields.CustomField//Define custom field variableCustomField customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("field name")//Definr issue variable. There is a build-in variable into script postfucntions, conditions and validators.//Since this line should be commentedIssue issue = ComponentAccessor.getIssueManager().getIssueObject("issue key")//get custom field valueissue.getCustomFieldValue(customField)//orcustomField.getValue(issue)
2) What do you mean "make issue type" - does it mean to change issue type?
3) There is no link "issue type". The only option - change issue type.
Best regards,
Vasiliy
Thanks Vasily for your response !!
I want to create my own issue type, based on the custom field condition.
Suppose, if the custom field value is no then do nothing. If it's yes create the new issue type with name "Bug".
This is what i want.
You see, issue type is one of basic values of an issue. Because with it issues assotianted with workflow, screent scheme, field configuration scheme. So, change issue type is very difficalt operation.
Do you want to create new issue from current or you want to change issue type of current one?
Thanks Vasiliy !!
So, If i want to create my own issue type, what changes required in JIRA and how it will impact the overall process ?
If you can help me with groovy script, how can i read the value from available issue type and change issue type of current one ?
Regards,
Dileep.
It looks like you're new here. Sign in or register to get started.