Forums

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

Update Values In Automation URL

Alae Riahi May 25, 2023

Hello Team,

 

Briefly, we are working on an integration between Jira Cloud and the ARES system,

We want to use Jira smart value in the URL,

In order to extract the field value and insert the link into this format "JSON_P1={{issue.customfield_10236.substringBefore(":")}}" but this is not working, even when we trigger it from the issue where the value of the smart value is correctly set, also it works well with the comment but not updating the URL with the values,

We tried to update from the data section with JSON values but seems always to only get the values from the link, since we are using the POST method with this,

Any idea on how to fix this?

 

Capture d’écran 2023-05-25 203659.png

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2023

Hi @Alae Riahi -- Welcome to the Atlassian Community!

When I did this a while ago, there were two parts I used to make it successful:

  1. Store your URL in a created variable, and use urlEncode on your text to ensure it is formatted properly: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#URL-encoding
  2. In your Send web request action, use the created variable

I retested this and it worked.  When you store the URL in a created variable, you can also echo that to the audit log to confirm it looks well formed before use.  This will confirm if your text handling is parsing as you expect.

Kind regards,
Bill

Alae Riahi May 26, 2023

Hello @Bill Sheboy 

Thank you for helping with this,

I tried this urlEncode as shown on the screenshots:

And I get this error response:

Error publishing web request. Response HTTP status:
500
Error response HTTP body:

 

Please check the attached screens
And thank you in advance
Capture d’écran 2023-05-26 085827.pngCapture d’écran 2023-05-26 090056.pngCapture d’écran 2023-05-26 090807.png
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 26, 2023

Please try removing the urlEncode wrapper and instead use this only for your smart value included:

{{issue.customfield_10236.substringBefore(":").urlEncode}}

If that does not work, I again suggest saving the URL in a created variable first, writing the result to the audit log, and then using the created variable as the Web Request URL in the send action.

Alae Riahi May 26, 2023

Thank you very much @Bill Sheboy !

This has been fixed as requested.

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events