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") { 
    myres.setFormValue(7)
}

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

This widget could not be displayed.

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.

This widget could not be displayed.

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 Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

510 views 3 18
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