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,555,014
Community Members
 
Community Events
184
Community Groups

Set Issue Field - JMWE

Edited

LOB.PNG

 

I have 2 fields, LOB(User) and New LOB.

How do I do it, when I select the value "Wholesale Banking" or "Wholesale Funding" from the LOB(User) field, the value of the New LOB field will automatically change to "LOB Wholesale Banking Group"

if LOB User = Commersial Banking Supply Chain, set New LOB = LOB Wholesale Banking Group

can anyone provide an example query?

2 answers

1 accepted

1 vote
Answer accepted
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

Hi @RIZKY JTUASIKAL 

you need to use a Set Issue Fields post-function, select the New LOB field as the field to set, and for the value use something like this:

{%- switch issue.fields.customfield_12703.value -%}
{%- case "Commersial Banking Supply Chain" -%}
LOB Wholesale Banking Group
{%- endswitch -%}

Notice the "{%-" and "-%}" that are "absorbing" whitespace created by the newlines. Without them, you'd need to write this:

{% switch issue.fields.customfield_12703.value %}{% case "Commersial Banking Supply Chain" %}LOB Wholesale Banking Group{% endswitch %}

Hi @David Fischer _Appfire_ ,

 

thank you for the answer.

 

LOB.PNG

is it like this ?
"customfield_12703" is the LOB User field


but when I tried it, I didn't get any results

is there something wrong with my settings? :(

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

Well, it depends on a few things. First of all, the values (both the case value and the resulting value) are case-sensitive and space-sensitive. You also need to make sure there is no trailing space in the values of the New LOB 2023 field.

Then, is customfield_12703 a single-select custom field? When you "test" the value in the editor against an issue that has the "Wholesale Banking" value, do you get "LOB Wholesale Banking Group"?

Well, it depends on a few things. First of all, the values (both the case value and the resulting value) are case-sensitive and space-sensitive. You also need to make sure there is no trailing space in the values of the New LOB 2023 field.
>> I think this is the cause


Now it works :)

Thank you so much @David Fischer _Appfire_ 

I tried this query, 

 

{% switch issue.fields.customfield_12703.value %}
{% case "Commersial Banking Supply Chain" %}
LOB Wholesale Banking Group
{% endswitch %}

 

is there something wrong with the query?

Suggest an answer

Log in or Sign up to answer