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

Automate URL using Set Issue Field - JMWE

I have 2 fields, BA Department and URL Capacity Calculation.

Capture.PNG

How do I do it,

when I select the value "IT BA Corporate Function" from the BA Department field, the value of the URL Capacity Calculation field will automatically change to "https://jira.btpn.skyfencenet.com/wiki/spaces/MI/pages/3960931426/IT+BE+Corporate+Function+-+Resource+Capacity+Calculation"

I have tried the following method, but the result is not showing
Captures.PNG

I've tried removing the "https://" but it still doesn't work

 

Can anyone help me?

1 answer

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.
May 19, 2023

Hi @RIZKY JTUASIKAL 

Where did you add that post function? Are you sure it's actually running when it needs to? Did you check for errors (on the summary of the post function)?

And when you say the result is not showing, what she's it mean?

Hi @David Fischer _Appfire_ ,

Where did you add that post function? 

>> from status A to B

status.PNG

Are you sure it's actually running when it needs to? Did you check for errors (on the summary of the post function)?

>> when I checked, there is no error information appeared

no error.PNG

And when you say the result is not showing, what she's it mean?
>> The result should appear on the View Screen (yellow highlight, under the BA Department field)

result.PNG

is there something wrong with my query @David Fischer _Appfire_ ?
or is there a character missing from my query? :(

as additional information, I used a custom field (single list/choice) for the URL Capacity field:

field.PNG

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.
May 19, 2023

Did you "test" the Nunjucks template (using the "test Nunjucks template" button) against an issue to make sure the correct value is returned?

What is the type of the BA department field? And of the url capacity calculation field?

Did you "test" the Nunjucks template (using the "test Nunjucks template" button) against an issue to make sure the correct value is returned?

>> here's the result:

rsult nunjuck.PNG

 

What is the type of the BA department field? And of the url capacity calculation field?
>>
BA Department field = 

ba.PNG

URL Capacity Calculation field =

url cap.PNG

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.
May 19, 2023

As you can see, testing the nunjucks template against an issue returns an empty string instead of the appropriate value. This means that the values inside the case statements are probably not exactly the value selected. It could be a case issue (upper vs lower case) or a trailing space in the single-select options. To check the exact value of the BA Department field, you can test this against the issue:

*{{issue.fields["BA Department"].value}}*

and copy the value between the asterisks (including any leading/trailing spaces) 

Like RIZKY JTUASIKAL likes this

Hi @David Fischer _Appfire_ 

sorry for the late reply,

and thank you very much for all your feedback!

Now it's working properly

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events