Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Age of issue (scripted field)

Andrew Striletskyi August 29, 2018

Hello everyone

How to get age of issue (using scripted field - date picker) in the following format : 00:10 (hours:minutes) . I've tried to implement It using this code:

import com.atlassian.core.util.DateUtils

DateUtils.getDurationString(((new Date().getTime() - issue.getCreated().time) / 1000) as Long)


But I get Invalid date in field :( 




1 answer

1 accepted

3 votes
Answer accepted
Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2018 edited

If you change the type of the scripted field from "date picker" to "text field" it will give you the result you want.

Your code is fine.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Jira Events