Forums

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

jira automation - extract value from summary

Gavin
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.
June 23, 2023

Hi All,

What I would like to do:

- use jira automation to extract a value out of text

- use that value to populate another smart field specifically next business date to auto set a due date through.

 

Workflow:

- send an email to jira - working 

- use AID# as the subject the # = to a numerical value 1-9 - working 

- {{issue.summary.charAt(3)}} = 1-9 - working 

- {{now.plusBusinessDays({{issue.summary.charAt(3)}})}}  to set the due date value- NOT working 

does this have to be converted to a numerical value (if so how?)

 

Question:

how can I take the numerical value 

test.jpg

2 answers

0 votes
Trudy Claspill
Community Champion
June 23, 2023

Hello @Gavin 

When you extract a portion of a string you are extracting "text", even if the text itself is actually a number.

I think you need to convert the extracted text to a number.

Additionally you don't need the curly braces within the parentheses.

{{now.plusBusinessDays(issue.summary.charAt(3).asNumber)}}

 A debugging tip for Automation Rules is to use the Log action to write information into the rule Audit Log. You can use it to write out any smart value or calculation to see what value is actually being used by the Automation Rule. 

0 votes
Tim Perrault
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.
June 23, 2023

Hi @Gavin 

 

Have you tried {{now.plusBusinessDays({{issue.summary.charAt(3).toDate}})}} ?

 

You might need to change it into a date before adding 3 days, but I think that's the issue. You are trying to add days to a string and not a date

Suggest an answer

Log in or Sign up to answer