guys,
I'm newly in JIRA development .
I'm developing a QA workflow and for some transitions I'll present to user a screen where I'll get some data to create a sub-task to address the develop team to fix something and get back to continue the QA workflow ... how can I get the screen's field to allow me to create the sub-task from post function groovy script ?
import com.atlassian.jira.component.ComponentAccessor def customFieldManager = ComponentAccessor.getCustomFieldManager() def transitionfield = customFieldManager.getCustomFieldObjectByName("Name of the field") def Value = issue.getCustomFieldValue(transitionfield)
Once you have the value, you can use it to create the subtask. You might have to experiment with the order of this script in your transition post functions.
However, this is a bad practice.....don't do it.... you would be better off creating a new transition for each possible value of the transitionfield and let the user select the correct transition.
Greetings.
hello Danyal - thx for your response ...
I have to bother you a little bit:
when I run in the script console for test the code I'm getting the error below:
I can't fix it ... sorry ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
never maint ... I did realize that issue... will only be available on Post Functions, Validators and behaviors not at Console ... sorry ... I told you I'm newly ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
seems like you figured it out yourself.
you could also use
def Issue issue = issue
to define the issue, but it is probably excessive.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.