Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Custom field options bypassing behaviour script Edited

I've created a behaviour script that dynamically filters out certain options in a custom field based on what was selected in a filter field. The filtering is based on complete replacement of the set of options rather than removing each not applicable option one by one. It was working fine.

I've added some new options recently, and those options aren't being seen by the behaviour script. There are 3 scenarios in which this is apparent, each based on what value in the filter field is selected. In all 3, the log file shows that the script sees the initial unfiltered option set correctly, with the new and old options.

Sample option list: a, b, c, new; Where "new" is my newly added option.

Possible filter field values: a, b, c, new, test.

1. select "a" in filter field. option list filters into: a, new. The logs say that only "a" matches the filter, yet the "new" option is appended nonetheless.

2. select "new" in filter field. option list filters into: new. when filtering is done, the log says that there are no options that match the filter, yet "new" is in it somehow.

3. select "test" in filter field, which doesn't correspond to any options in the option list. option list filters into: new. when filtering is done, the log says that there are no options that match the filter, yet "new" is in it somehow.

Any ideas why this is happening?

I should note that I've initially imported a bunch of values using the "Bulk import custom field values" built-in script. After that I've added more values (tried manually and through the script) and this behaviour began occuring.

1 answer

1 accepted

I’ve identified the problem cause. For an unknown reason, likely due to some oversight in the code of the ScriptRunner plugin or JIRA, select list options for a field cannot contain more than 1 set of brackets. If any option in the list does, any scripts that attempt to manipulate that option list will not have any effect. Example culprit option: test (test (test)).

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

66 views 0 3
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