Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Avoid Scriptrunner behaviour triggering when entering Edit screen Edited

Hello!

I am using a Scriptrunner behaviour to programmatically check options in a checkbox list, depending on what was selected in a select list, however, the user should be able to uncheck these options, if needed. The behaviour works fine initially, but when the issue is edited, the behaviour for the select list will trigger if there is an option selected and will reselect those options. The list will auto reset the moment I enter the edit screen.

I was able to primarily solve this by updating the behaviour script for the checkbox list itself to retain what was selected, but whenever all the boxes for the checkbox list are unchecked, the behaviour does not trigger, and the list will reset in this instance.

I've also experimented using underlyingIssue.getCustomFieldValue to only trigger the auto-selection if the value in the select list has changed. However, this will retain the checkbox list values initially on Edit, but the auto-select of the select list will no longer function properly if selecting another option, then returning to the original option. If possible, I would like to only trigger the behaviour for the select list something was changed in the select list itself, but avoid triggering it initially on Edit.

Is there any way to solve this?

Thank you!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

209 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you