Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automate URL using Set Issue Field - JMWE

RIZKY JTUASIKAL
Contributor
May 19, 2023

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
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?

RIZKY JTUASIKAL
Contributor
May 19, 2023 edited

Hi @David Fischer ,

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 ?
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
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?

RIZKY JTUASIKAL
Contributor
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?

>> 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
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
RIZKY JTUASIKAL
Contributor
May 22, 2023

Hi @David Fischer 

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
Product Admin
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events