Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation that extracts text from comment

Toby Te Rupe February 23, 2024

I would like to check in a comment the following

duplicate of ABC-123

would like to check I’d duplicate text in comment (case in sensitive) if it does extract the   Numbers after ABC- which would be 123 

 

I am the. Going to close this ticket and link it to the one mentioned

thank you.

3 answers

1 accepted

0 votes
Answer accepted
Toby Te Rupe February 27, 2024

Thank you I have figured this out and will publish here.

Capture.PNG

 

Capture.PNG

3 votes
Pablo Vergara February 26, 2024

Hi @Toby Te Rupe 

 

I've been looking into your use case. Initially, I don't see a way to accomplish the outcome other than using a workflow automation tool.

While Jira provides its automation engine (Automation for Jira), besides other prominent actors (e.g., JMWE, Power Scripts, etc.) in that space, you can find it on the Atlassian Marketplace.

Unfortunately, as you can see in the attached picture below, the challenge lies in capturing the issue key from the comment. For some reason, Jira is not providing the option to use smart values (https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/) as an option to extract the issue from the comment and use it as a variable to link the issue to.

This is weird, as they state smart values can be used when building this automation rule. You can raise a ticket with Atlassian support and see what the reason behind it could be.

"You can link to the issue that triggered this rule, previously created issue, a smart-value or simply an issue key."

- Pablo Vergara / ServiceRocket SSE

Screenshot 2024-02-26 103309.png

 

Toby Te Rupe February 26, 2024

Thank you Pablo.

I should have mentioned that I wanted to perform this in JIRA automation. Would like a regex to extract the the Key and also to check if duplicate is in the phrase.

It is the regex I am struggling with,

Pablo Vergara February 27, 2024

No worries @Toby Te Rupe 

You could then use a regex like: \b[A-Z]{3,}-\d{3,}\b

(feel free to adapt it if needed so it can be used on the Automation for Jira rule builder)

Let me know how it goes!

- Pablo

Screenshot 2024-02-27 105844.png

0 votes
Toby Te Rupe February 27, 2024

Thank you, just now need someway of extracting the Key and passing it to this JQL

Capture.PNG

Suggest an answer

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

Atlassian Community Events