Question about Issue #461 / Not working properly for old issues
I needed to make a new field that would show the time taken from issue created to done. I followed your instructions found here: https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/461/time-duration-format
I got it working properly for new issues, but when applying a transition to old issues, JIRA gives me an error message. Unfortunately I do not have the error message since I needed to revert back to not having this.
Would you be able to help me on how to apply this to a current project so it wouldn't affect the old ones? The issues created before this don't have to have the "time taken" information, but would be great if this was possible.
Currently I'm not using custom schedules, but will it be easy to change the post function later if custom schedules are needed?
Thank you!
Comments (5)
-
reporter -
repo owner Use the following expressions instead of the ones provided in step 4 of issue
#461:1) For "Mathematical and date-time expression calculator" post-function use the following:
{aaaaa} != null ? ({00057} - {aaaaa}) / {MINUTE} : null
2) For "Copy a parsed text to a field" post-function use the following:
{aaaaa} != null ? shortFormatDuration({00057} - {aaaaa}) : null
where aaaaa is field code of Date Picker custom field where you store the transition time.
-
repo owner But you can also use the following alternative approach: create a "Calculated Number Field" with the following configuration:
Formula used in this field is:
{00112} != null ? {00112} - {00009} : null
where
{00012}
is field code for Date and time of resolution, and{00009}
is field code for Date and time of creation.I'm assuming that you are setting resolution when transition is moved to Done status.
This solution works for new and old issues, and doesn't require any modification in your workflows.
-
reporter Thank you very much! Both of the options work exactly as wanted. The second option was the perfect solution for me as no need to modify the workflow and works for old issues. Thanks again!
-
repo owner - changed status to resolved
You are welcome.
- Log in to comment
Just to confirm that custom schedules are not needed at the moment.