The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Behaviours Plugin Bug? add two behaviours on same field will overwrite previous one?

fabby
Contributor
June 6, 2012

my jira version is jira 4.4.1.

for example,i add two behaviours on the same filed "resolution":sw,st

1 i add "When Resolve Issue" condition on sw,and add script to 'sw'

log.debut("\nsw not read only\n")

2 and add "When Close Issue,Reopen Issue" condition on st,and add script to 'st'

FormField resolutionField=getFieldById("resolution")
resolutionField.setReadOnly(true)
log.debug("\nst read only---\n")

then no matter i resolve,close or reopen an issue,the field "resolution" is always displayed "read only"

when i delete the 'sw' script.the behaviour is normal.resolving an issue ,"resolution" will not display read only.closing or reopening an issue will make "resolution" read only

it's so strange! as if "sw" and "st" script are all executed one by one in order.later behaviour will overwrite former behaviour. because "st" is later than "sw" in order,so "sw" might present the final result.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Mizan
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 Champions.
June 6, 2012

I did not get why you need two scripts on same field , If you feel its a bug you can raise it on jira.atlassian.com select JBHV project .

You will have to put your logic in a single script for now .

fabby
Contributor
June 6, 2012

hi,Mizan

i write two script on same field because i want to dispaly different thing when on diffent action screens.

i find the Behaviour Plugin can support workflow action condition.

so i separate them according to different workflow action.

TAGS
AUG Leaders

Atlassian Community Events