Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL + JQL Plugin. Date difference

Алексей Терещенко
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2020

query 

SELECT 
KEY(JQL.ISSUE) as "Issue",
CREATED(JQL.ISSUE) as "Created",
CF(JQL.ISSUE, 11201) as "Closed",
(CF(JQL.ISSUE, 11201) - CREATED(JQL.ISSUE)) as t
FROM JQL
WHERE JQL.QUERY = ' type="_task_" AND "_custom_field_date_" >= startOfMonth()'

returns an error: 

Feature not supported: "VARCHAR - TIMESTAMP"

But the custom field CF(JQL.ISSUE, 11201) is of type Date! 

Help with fix this error! Does anyone know a solution?

1 answer

1 accepted

0 votes
Answer accepted
Алексей Терещенко
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2020

I found a solution:

SELECT 
KEY(JQL.ISSUE) as "Issue",
CREATED(JQL.ISSUE) as "Created",
CF(JQL.ISSUE, 11201) as "Closed",
DATEDIFF('day', CREATED(JQL.ISSUE), CF(JQL.ISSUE, 11201)) as "DiffDate"
FROM JQL
WHERE JQL.QUERY = ' type="_task_" AND "_custom_field_date_" >= startOfMonth()'

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events