Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

John Love April 29, 2013

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

0 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 29, 2013

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.

0 votes
John Love April 29, 2013

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
TAGS
AUG Leaders

Atlassian Community Events