JIRA transition on custom field edit

I would like to re-open an issue to start it over if a custom field for a team selection is changed.

I can't seem to find anything that will transition an issue after a field is updated.

Anything out there I can use for this? 

1 answer

1 accepted

0 votes

You'll need to find or write a listener that can pick up any event that might mean the field could have changed, check for the change and issue the transition.

I don't think the Automation add-on can do the field confition, but other add-ons can.  I would, of course, use the Script Runner to do it (as I use it for almost everything).

Ah yes Scriptrunner - I will test that now - Thanks!

Currently stuck on the logic to pickup the change in the field value.

I want to essentially perform the following condition check when an item is updated:

"cfValues['Group Number'] is updated"

Scriptrunner does not like the syntax here. It seems to want a value I have as an option in the dropdown menu for the field. 

Would you happen to know what the syntax would look like for picking up a field update? 

I've not worked with the conditions much, I don't know if they can pick up that.

I've done it in pure code (i.e. just a "scripted listener" without any condtions) with something like:

def change = event?.getChangeLog()?.find {it.field == "My Field"}
if (change) {
<do stuff>
}

But, you may need to check that the "change" item in there contains something different to the current content of the field.  It's been a while since I've tinkered with that idea.

I think that'll still work in combination with conditions, so you could have a simple condition like "is issue type", and then still have the more advanced "only do this when a certain field has changed"

I am working on a workflow transition and screen configuration to get this done cleaner.

Only the create screen will show the custom field. If someone wants to change the value they have to change the workflow which will display a custom screen showing the field where they can make a change. Once the change is made the workflow transitions to being open again.

In theory, this should work nicely. I am implementing it now. 

I was able to get it working with screens and workflow changes.

  • The creation screen shows the custom field.
  • The view screen shows the custom field but it does not exist in the edit screens.
  • If someone wants to change the field they must choose the change group workflow item which displays the custom field allowing them to change it. 
  • The issue is transitioned to reopened starting the workflow again in the new groups queue. 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot