Forums

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

JMWE - Sottrai il registro di lavoro di una storia su un campo personalizzato "Stima Story" della st

Stefano De Santis
March 11, 2026

Ciao,

Ho creato un campo personalizzato chiamato "Stima Story" (campo numerico); quello che vorrei fare è sottrarre ogni volta che qualcuno registra il tempo sulla storia, sottraendo quel valore dalla "Stima Story". Tutto deve essere convertito in giorni.

Sto usando questo script ma non funziona

{{ (issue.fields["Stima Story"] o 0) - (worklog.timeSpentSeconds / 28800) }}

Grazie

1 answer

Suggest an answer

Log in or Sign up to answer
2 votes
Enric Font
Community Champion
March 11, 2026

DEar @Stefano De Santis 

JMWE the template you’re using is Nunjucks.

o 0 is not valid syntax (that looks like Groovy/Italian). Use || 0.

worklog.timeSpentSeconds exists only in the Worklog event context; otherwise it’s undefined.

 

Correct script:

{{ (issue.fields["Stima Story"] || 0) - ((worklog.timeSpentSeconds || 0) / 28800) }}

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events