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: 

System Fields Behavior not working

Alvin
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.
September 29, 2018

Hi Community, I am trying to show/hide and make fields required using behavior within System Fields (Priority, Resolution) but even the sample in Scriptrunner Behavior is not working but it throws no errors. Can you please help me

import com.atlassian.jira.issue.resolution.Resolution

def resolutionField = getFieldById("resolution")

def fixVersionsField = getFieldById("fixVersions")

def resolution = resolutionField.getValue() as Resolution

if (resolution.name == "Fixed") {

fixVersionsField.setRequired(true)

fixVersionsField.setHidden(false)

} else {

fixVersionsField.setRequired(false)

fixVersionsField.setHidden(true) }

 

it just not follow the behavior. 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Alvin
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.
September 30, 2018

Already fixed, sometimes it is just not working. I dont know if its a bug or something

TAGS
AUG Leaders

Atlassian Community Events