I want to set a resolution default value using the Bahaviours plugin

Our default resolution for JIRA is "Fixed", but I have a project in which I would like to set the deafult value of the Resolution field to "Review Completed". I am attempting to do this with theh Bahaviours plugin by including some simple server side code to a workflow transition. Here is what I have:

FormField myres = getFieldById("resolution")
if (myres.getFormValue() == "1") { 

In the example above "Fixed" is value "1" and "Review Completed" is value "7". It works, except that I can never choose "Fixed" even if I wanted to.

What I realy need is a way to excute this only once with perhaps an onload or something, but it doesn't appear that Behavious has sunch an event.

2 answers

1 accepted

You can't attach this behaviour to the resolution field - otherwise it will work as you say (as it should). Try attaching it to some field the user can't change in the form, for instance the issue type.

Wow...Fast answer! Some days I think my brain just doesn't work. Thanks so much. This works perfectly now.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


263 views 0 6
Read article

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