How to display number of days for Total Time in Status in Table Transformer

Adrian Avalos May 1, 2024

Hello. I added Total Time in Status field to Table Transformer, but it displays issues in format 2w 1 d 2h 33m. I'm looking to display this instead as number of days (rounded to nearest day)  Can someone provide a script to do this conversion or provide an alternative?

 

1 answer

1 accepted

2 votes
Answer accepted
Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2024

Hi @Adrian Avalos ,

You may try the following workaround:

Fri 13-4.png

Now you set your date format (for the FORMATDATE function) and your worklog settings (for the FORMATWORKLOG function) as following:

Fri 13-1.png

Fri 13-2.png

Then you may use the following query:

SELECT *,
FORMATDATE(T1.'Time') AS 'Days 1',
FORMATWORKLOG(T1.'Time') AS 'Days 2'
FROM T*

Fri 13-3.png

The more complicated query

SELECT *,
ROUND((FORMATWORKLOG(T1.'Time')->split("d")->0)::number) AS 'Days 3',
CEILING((FORMATWORKLOG(T1.'Time')->split("d")->0)::number) AS 'Days 4'
FROM T*

can round the number of days mathematically ('Days 3') and round the number of days to the next day ('Days 4' that is pretty similar to 'Days 1' with the FORMATDATE function):

Fri 13-5.pngSo, you may "play" with the queries and choose what suits you more. Hope we were able to help. 

Adrian Avalos May 6, 2024

@Stiltsoft support thanks so much for your help! I went with the more complicated query and it worked

Like Stiltsoft support likes this

Suggest an answer

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

Atlassian Community Events