Forums

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

Regola di Auotmation che non mostra decimali

Stefano De Santis
February 25, 2026

Ciao a tutti,
sto lavorando con una regola di Jira Automation di Atlassian e ho un problema sulla gestione dei decimali quando converto i worklog in giorni.

Contesto

Ho un custom field numerico chiamato:

Residuo a finire

Lo stesso campo è presente sia sugli Epic sia sui Work Package.

La regola viene eseguita in branch sui worklog (For each worklog) e serve a scalare dal campo Residuo a finire dell’Epic (dalle Story - Epic è padre delle story) il tempo loggato, convertendo i secondi in giorni.

Formula usata
{{issue."Residuo a finire".asNumber.minus(worklog.timeSpentSeconds.divide(28800.0))}}

(1 giorno = 28.800 secondi)

Comportamento atteso

Se loggo:

4 ore (14.400 secondi)

mi aspetto che venga scalato:

0,5

dal campo Residuo a finire.

Comportamento reale

se loggo 1 giorno (28.800 secondi) → viene scalato correttamente 1

se loggo 4 ore → non viene scalato nulla (risultato 0)

Quindi le frazioni di giorno vengono perse.

Verifiche già fatte

  • uso la divisione con valore decimale (28800.0)
  • uso .asNumber sul campo
  • la sottrazione è tutta all’interno della stessa smart value
  • sono correttamente dentro un branch sui worklog

Dettaglio importante

Sul Work Package, sul campo visivamente chiamato allo stesso modo (Residuo a finire), i decimali vengono visualizzati correttamente. Per il Work package (padre dell'epic) ho una regola diversa che fa il roll up e somma le epic.

Potete aiutarmi? Grazieff329859-aa19-4b1d-b4e0-77998f2b6ca5-0.jpgff329859-aa19-4b1d-b4e0-77998f2b6ca5-1.jpgff329859-aa19-4b1d-b4e0-77998f2b6ca5-2.jpgff329859-aa19-4b1d-b4e0-77998f2b6ca5-3.jpgff329859-aa19-4b1d-b4e0-77998f2b6ca5-4.jpg

1 answer

0 votes
Bill Sheboy
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 Champions.
February 25, 2026

Hi @Stefano De Santis 

Your smart value expression is encountering value-type differences for inline math expressions versus long-format expressions.  Please look here to see an article I wrote explaining that behavior difference:

https://community.atlassian.com/forums/Automation-articles/Automation-concepts-Using-Created-Variables-as-Numbers/ba-p/2953116#:~:text=Number type handling

 

The fix for your scenario is to use a long-format expression, and then add the ROUND() function to select the precision you want.  To learn more, see examples of such expressions here:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

 

Kind regards,
Bill

Stefano De Santis
February 26, 2026

Ciao @Bill Sheboy io non voglio che il valore venga arrotondato ma che abbia anche i decimali

Bill Sheboy
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 Champions.
February 26, 2026

Thanks for that information, @Stefano De Santis 

Please try the long-format of a math expression and observe the result.  If you run into problems, please post the expression you are using and what is not working as expected.

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