Forums

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

Is there a way to extract a URL from the last comment and then edit a custom field to include that?

Phil Jones
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2024

So I'm stepping into an environment where a request has been around for a while to have a URL extracted from the last comment and adding it to a URL custom field. 

I've added the custom field (URL Field), I've created an automation that conditions to look for a regex that includes the URL we need (domain.atlassian.net). However I'm running into issues adding an action with a smart value to extract that URL that the condition is checking for. 

The condition I'm using a smart value checker to look for a regex pattern in the last comment.

However, in creating the variable I'm trying to use something along the lines of: 

{{comment.last.body.match(regexpattern)}}

When I have it update the log, the log is empty. 

Any help would be greatly appreciated!

1 answer

0 votes
Alex Ortiz
Community Champion
September 17, 2024

If the custom field is available, why can't the user just put in the URL straight into the field?

Additionally, you could create a screen that pops up when you transition an issue that then displays the URL custom field?  And if needed, you can make that field be required before you can transition.  Just a thought because going down and thinking about regex patterns frightens me =)

Phil Jones
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2024

These comments are being added by slack sorry, so we have a connection with slack that will just add the message as a comment.

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