Need help covert the number to time

Devarajan Mani
Contributor
August 11, 2024

I have a short text custom field to capture manually entered value ex: 29 hours

I need to convert this similar to time in status format ex: 1d 5h 23m

Is there a way to convert to the above format?

Thanks

Dev

3 answers

1 vote
Trudy Claspill
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 11, 2024

Hello @Devarajan Mani 

There is not a native conversion function to change text into the "pretty" version of duration that Jira displays. You would have to create you're own conversion process. With a text field that is going to be complex because the text may not be entered in a standard and validated format. It would be easier if it was a number field and you used it to enter just a specific type of duration - only hours, for example.

You would also have to consider how many hours constitute a "day" and how many "days" constitute a "week".

What problem are you trying to solve by having a field where you enter duration? And what problem are you trying to solve by converting the display format for that information?

0 votes
Valeriia_Havrylenko_SaaSJet
Atlassian Partner
August 12, 2024

Hi @Devarajan Mani   👋

If you consider installing third-party add-ons to help, you can try marketplace add-ons with time formats feature. One if them is Time In Status add-on.

For instance, here is how it will be visualized for the Time In Status report:

2024-05-30_12-01-21.png

The Format option lets you select the time format of status duration:

  • Minutes

  • HoursMinutes

  • Hours:Minutes

  • DaysHoursMinutes

  • Decimal Weeks

  • Decimal Hours

  • Decimal Days

  • Business Decimal Weeks

  • Business Decimal Days

  • Business DaysHoursMinutes

image.png

 

You will also be able to access Time in Status data in the Dashboards.

       Знімок екрана 2024-07-31 о 13.53.29.png 

You can book a live demo - we'll show you the application inside out and answer all your questions.

Add-on have 30-day free trial and free up to the 10 users.

I hope you find this helpful 🚀

0 votes
Joseph Chung Yin
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 11, 2024

@Devarajan Mani 

I agreed with @Trudy Claspill stated.  The problem with short text data type field is that there is no nomenclature format control against what users enter into the field.  

Example -

One can entered 27 hours, and another one can entered 27 hrs or even 27 h or just 27.

It will be very complex to design the conversation process around a text field.  I would recommend that you to create a integer field, at the minimum, it is easier to convert number into date/time value.

Again, what are you trying to achieve for the existing custom text field to conduct what action?

Please advise.

Best, Joseph Chung Yin

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events