Forums

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

Change asset date Attribute by adding days from integer attribute

Gerrit Wahlers
Contributor
July 10, 2025

We have added some machines as assets in jira. Those machines have 2 attributes: "maintenance date" (type: date) AND "maintenance cycle" in days (type: integer). 7 days before reaching the maintenance date, jira will open a work item for the scheduled maintenance via automation rule.

After resolving this work item, i want to set the new maintenance date to NOW+asset.maintenance cycle. 

Whenever i read the asset attribute "maintenance cycle" i can output the value in a protocol action. But if i try to perform mathematical operations (like dividing the value by 2) with this value, it always returns NULL.

For example the asset attribute "maintenance cycle" (integer) holds the value 180, these are the following outputs:

{{object.maintenance cycle}} = 180
{{object.maintenance cycle.asNumber}} = NULL
{{object.maintenance cycle.divide(2)}} = NULL
{{now.plusDays(object.maintenance cycle)}} = NULL

The last smart value i want to use in a edit object action within my automation.

1 answer

1 accepted

2 votes
Answer accepted
Manon Soubies-Camy
Community Champion
July 10, 2025

Hi @Gerrit Wahlers,

Have you tried using a temporary variable to store the cycle duration? The below rule works on my side:

asset-1.png

  • Variable name: cycle
  • Smart value: {{object.Maintenance cycle}}

asset-2.png

  • Smart value: {{now.plusDays(cycle.asNumber)}}

Hope this helps!

- Manon

Gerrit Wahlers
Contributor
July 10, 2025

Hi @Manon Soubies-Camy 

Wow, thank you very much. I could never imagine that i have to create a variable at this point.

result.png

Have a nice day!

 - Gerrit

Like # people like 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