The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
David Fischer
Community Champion
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

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

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events