You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I am using confluence to track the risks and the table has these columns:
I am calculating the aging by using the below query for the open issues.
SELECT *, ROUND(DATEDIFF(day,'Open Date',CURRENT_TIMESTAMP))+ " day(s)" as 'Aging' from T1
For the closed issues, I need to find the elapsed time between Open and Closed dates.
So can someone help me to construct the query to check if the status is closed then use this query
SELECT *, ROUND(DATEDIFF(day,'Open Date',CURRENT_TIMESTAMP))+ " day(s)" as 'Aging' from T1
Else
SELECT *, ROUND(DATEDIFF(day,'Open Date','Closed Date'))+ " day(s)" as 'Aging' from T1
Hi @Shathya Bhama V R ,
You may try the following SQL queries:
Option 1
SELECT *,
CASE WHEN T1.'Status' LIKE "Closed"
THEN ROUND(DATEDIFF(day,'Open Date','Closed Date'))+ " day(s)"
ELSE
ROUND(DATEDIFF(day,'Open Date',CURRENT_TIMESTAMP))+ " day(s)"
END
as 'Aging' from T1
Option 2
SELECT *,
CASE WHEN T1.'Status' LIKE "Open"
THEN ROUND(DATEDIFF(day,'Open Date',CURRENT_TIMESTAMP))+ " day(s)"
WHEN T1.'Status' LIKE "Closed"
THEN ROUND(DATEDIFF(day,'Open Date','Closed Date'))+ " day(s)"
END
as 'Aging' from T1
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.