[TIME-185] Format time with pretty style

Issue #185 resolved
Andriy Zhdanov created an issue

when I enter smth like 10 min I see 0.167h in a report, but I'd love to see 10m.
it'd be great if you change output to that style.
http://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/util/JiraDurationUtils.PrettyDurationFormatter.html

By kubelox/Victor on Mon, 17 Oct 2011 03:44:09 -0700

Comments (7)

  1. Andriy Zhdanov reporter

    In issue #202 "[TIME-202] Please add Optin for human readable / naturally display" added support for optional pretty duration - set boolean jira.timesheet.plugin.prettyDuration jira-application property to true if needed.

    By azhdanov on Thu, 1 Mar 2012 06:41:55 -0800

  2. Andriy Zhdanov reporter

    I added this setting to the jira-application.properties file and restarted my Jira instance but it didn't change anything. We are running Jira 5.0.1 which doesn't appear to be using this properties file anymore and instead stores all application settings in a file named jpm.xml. Before I edit this file and add in this setting, do you or anyone in the community have ideas where the jira.timesheet.plugin.prettyDuration setting should go?

    By jamesr on Wed, 18 Apr 2012 17:55:00 -0700

  3. Andriy Zhdanov reporter

    Thank you. FYI, the file jira-config.properties didn't exist but I created it and it needed to live in the Jira home directory to be read.

    Now that I have this enabled, is it possible to have the field formatted in a short format. So instead of "2 days, 8 hours, 12 minutes" it would be displayed as "2d 8h 12m". Without this it throws the report formatting off by having too much word wrapping.

    Here is an example of the wrapping in the total column:

    2 weeks, 4 days, 1 hour, 12 minutes

    By jamesr on Mon, 23 Apr 2012 12:58:44 -0700

  4. Andriy Zhdanov reporter

    I have version 2.3.4 running Jira 5.0.1. I didn't see any formatting options to change "2 weeks, 4 days, 1 hour, 12 minutes" to "2w 4d 1h 12m". Did I miss something?

    By jamesr on Mon, 23 Apr 2012 14:53:33 -0700

  5. Andriy Zhdanov reporter

    There no such option, there is only jira.timesheet.plugin.prettyDuration jira property to have pretty or not pretty format, set to true plugin should now show "2d 1h 12m" instead of "2 days 1 hour 12 minutes", i.e. short pretty duration.
    You may need to update your plugin version.

    By azhdanov on Mon, 23 Apr 2012 23:44:26 -0700

  6. Log in to comment