Forums

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

Automation: Add multiply a custom field and add it like days to a date field

Facundo Castillo
Contributor
July 14, 2022

Hello, I have a problem that I cannot solve. I've been looking around the community and I haven't found a solution.

I have 2 fields:

  • Numeric type: "Number Flag"
  • Date Type: "Due Date"

When a issue is created i need to edit the field "Due Date" adding days:

  • "Due Date" plusdays ( "Number Flag" * 10)

Example:

  • 05/07/2022 + (2 * 10) = 25/07/2022

Any recommendation? Thanks!!!

3 answers

2 accepted

2 votes
Answer accepted
Aditya Sastry
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.
July 14, 2022

Hi Facundo,

Please try the below syntax in Project Automation 

{{issue.dueDate.plusDays(Number Flag.multiply(10))}}

Below is a screenshot of the section. I have used "Feature Ranking" a numeric field in my instance.

 

Untitled.png

Facundo Castillo
Contributor
July 15, 2022

Thanks for the help, i finish the problem with an hybrid with your answer and John,

Result:
{{#issue.Payment Date}}func=plusDays({{Number Flag.multiply(10)}}){{/}}

2 votes
Answer accepted
John Funk
Community Champion
July 14, 2022

Hi Facundo - Welcome to the Atlassian Community!

You should be able to do this with an automation rule.

When you update the Number Flag or Due Date field, you will use a syntax like this:

{{#triggerissue.duedate}}func=plusDays({{issue."Number Flag" * 10}}){{/}}

Give that a whirl and let's see what happens - hopefully I have the syntax correct. 

Facundo Castillo
Contributor
July 15, 2022

Thanks for the help, i finish the problem with an hybrid with your answer and Aditya, because * doesnt work in this query.

Result:
{{#issue.Payment Date}}func=plusDays({{Number Flag.multiply(10)}}){{/}}

Like John Funk likes this
John Funk
Community Champion
July 17, 2022

Great!

1 vote
Kian Stack Mumo Systems
Community Champion
July 14, 2022

Try to follow this documentation on math expressions. Have you already tried any of these?

Suggest an answer

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

Atlassian Community Events