In this example we configure a calculated number field for showing the time elapsed since issue creation to issue resolution. For issues which are still not resolved, the field will be uninitialized, thus it won't be shown in the view screen, following the previous steps in the first example, except at step 4 use the following math-time expression: , where {00112} is code for Date and time of resolution, and {00009} is code for Date and time of creation.
To achieve this the following functions are used: We select "Duration with short format" as display mode. This way, the string value of the field will be something easily readable, like 1d 11h 30m , but the numerical value will be the duration expressed in milliseconds. Other display options are available: - Duration with long format: we get something like,
1 day, 11 hours, 30 minutes . - Use time tracking settings: we get duration displayed using the number of working hours per day, and the number of working days per week as configured in time tracking, instead of 24 hours per day and 7 days per week.
Finally, the configuration of the new custom field should look like this: |