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

Set Issue field JMWE

Rizky.Tuasikal January 25, 2023

Set Issue Field.JPG

Can the field "IT PM Level" be determined by the contents of the field "IT Project Manager"?

for example, if I choose user A, then the value of the field "IT PM Level" will be Junior

and if I choose user B, then the value of the field "IT PM Level" will be Senior

 

 

How do I get such results?

2 comments

Comment

Log in or Sign up to comment
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2023

Hi @Rizky.Tuasikal ,

instead of using Conditional Execution, you can simply use a calculated value for the IT PM Level field. For example:

{% switch issue.fields["IT Project Manager"].accountId -%}
{%- case 'accountId:123445' -%}
Junior
{%- case 'accountId:67890' -%}
Senior
{%- endswitch %}

Also, I noticed that your initial approach was wrong: the template for the value of the field was returning either true or false, not Junior as I expect you wanted.

Rizky.Tuasikal January 25, 2023

Hi @David Fischer , 

thanks for your help, it works!

 

more question, 

if there is more than 1 user (user A, B, C) = Junior

can you show me the query?

 

sorry, this is the first time I learned this

Rizky.Tuasikal January 25, 2023

cal field.JPG

Hi @David Fischer ,

is it like this?

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

Almost. Just remove the | between the two case statements. 

Like Rizky.Tuasikal likes this
Rizky.Tuasikal January 25, 2023

project scale.JPG

 

if there are conditions like this, how does the query be?

example:

IT PM Level = Senior & Project Scale = Large

it will be : Project Scale - PM (%) = 50

@David Fischer 

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

You can use embedded switch statements:

{% switch issue.fields["PM Level"].value -%}
{%- case 'IT PM Senior' -%}
{%- switch issue.fields["Project Scale"].value -%}
{%- case 'Large' -%}
50
{%- case 'Medium' -%}
25
{%- endswitch -%}
{%- case 'IT PM Junior' -%}
{%- switch issue.fields["Project Scale"].value -%}
{%- case 'Large' -%}
40
{%- case 'Medium' -%}
20
{%- endswitch -%}
{%- endswitch %}
Like Rizky.Tuasikal likes this
Rizky.Tuasikal January 27, 2023

Hi @David Fischer 

 

thank you so much for your help.. it works perfectly

God bless you

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

Hi @Rizky.Tuasikal 

I'm glad it works. 

Would you mind "accepting" the answer so that other community members can  find it? Thanks. 

Rizky.Tuasikal January 30, 2023

Hi @David Fischer

sorry I didn't find a way to "accepting" an answer

 

I don't see any button to "accept" your answer

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

Oh, right, that's because you created a "Discussion" instead of a "Question" so there is no notion of "Answer", only "Comments".

TAGS
AUG Leaders

Atlassian Community Events