It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to capture data to be used in a transition?

We use ScriptRunner for automating steps for some of our transitions. What we would like to do is be able to prompt the user for some information when the transition occurs, which is used in the transition script, but isn't really part of the issue.

What we do right now, is add some fields to the issue so that they can be set via the screen, and then have the transition use the fields, and then clear them. The problem is that in some cases we just want to use that data for the transition.

Is there a solution for this? i.e. transition only fields?

2 answers

Hi Benjamin,

Thank you for your question.

I can confirm that it is not possible to have transition only fields with ScriptRunner for Jira Cloud, due to the fact that Jira Cloud does not support this and requires all fields to exist on a screen and have their values stored on an issue.

This means that to get input during a transition you would need to place a transition screen in the transition of your workflow which contained the fields that users would fill the value in so that you can use this value inside of your script.

If you are getting the value set on a screen during a transition then I can you need to place your post function below the post function named Fire a Generic Event event that can be processed by the listeners. in the list of post functions in order to ensure the value is set on the issue before you access it inside of your script.

I hope this information helps

Regards,

Kristian

So I take it that the simple answer is "no".

Could you explain what you mean by,

"If you are getting the value set on a screen during a transition then I can you need to place your post function below the post function named Fire a Generic Event event that can be processed by the listeners. in the list of post functions in order to ensure the value is set on the issue before you access it inside of your script."?

The way we do this now, is to create transition specific fields for issues, which we then set and clear after a transition. I was hoping to hear back from Atlassian that they have or are going to add a feature like that, i.e. transition based fields, or that they gave some way that ScriptRunner for Jira Cloud to request a UI be presented to the user.

Hi Benjamin,

Thank you for your response.

I can confirm that in my previous response I meant no it is not possible to have transition only fields with ScriptRunner for Jira Cloud.

I can also confirm that what I meant about how to configure the post function was that this is where I would place the post function to ensure the values entered in the transition screen are saved on the issue.

If you are setting and clearing fields during the transition then you do not need to worry about ordering your post-function script like this as you do not the field values provided during the transition to be saved on the issue.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you