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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,407
Community Members
 
Community Events
185
Community Groups

Jira script runner Behaviour to set custome list "Nth" postion value

Edited

Jira script runner Behaviour code for get "N th" item from Custom list 

There are 2 Custome list items 

One is Customefiled_id_3004 list

Second one is Customefiled_id_3005 (List of items values )

Based on Customefiled_id_3004 selected value will populate data for Customefiled_id_3005

Customefiled_id_3005 contains following options

postion 1: empty(null)

Postion 2: value1

Postion 3: value 2

Upto so on...

 

Requirement :1) When Customefiled_id_3005 value contains or selected  "postion 1: empty(null)" then it replace with other then "postion 1: empty(null)" that means needs to select  any of available options 

Like 

Postion 2: value1 OR 

Postion 3: value 2

Requirement :2) if Customefiled_id_3005 list  is not having postion 1: empty(null)"

Contains only following way

Postion 1: value1

Postion 2: value 2

Upto so on...

In this case selected value should keep as it is

 Conclusion: Customefiled_id_3005 list  is not having postion 1: empty(null)" then keep as it is selected value . or else of it is having empty(null) then select any one available option item

Needs to implement behaviour in jira script runner

Please guide Me Thanks

 

 

 

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 09, 2023

Hi @Inetinfo Inetinfo

After going through your description, this appears to be a list filtration, i.e. the option selected from the first list will determine the options available in the second list.

There are already a couple of examples of this available in the community. You can refer to this Community Post for more information.

Regarding your requirement for an Empty or Null value, this is not doable in the list. The best you can do is to select the None option in the List.

I hope this helps to answer your question. :-)

Thank you and Kind regards,

Ram

Suggest an answer

Log in or Sign up to answer