문제

Using Jira Issue Search, I have two custom date fields in my project. I want a filter that returns the issue with the earliest date from field 1. I want another filter to return issue with latest date from field 2.

Has anybody done a query similar before. I dont know the correct syntax and checking on Atlassian documents doesnt mention anything about max or min.

도움이 되었습니까?

해결책

You can create your own JQL functions using a free plugin such as Script Runner.

To get the data from Jira database, find the id of your custom field using

select * from customfield

Then use something like this

select 
    pkey
    , summary
    , datevalue

from 
    customfieldvalue c
    , jiraissue i

where 
    i.id=c.issue
    and c.customfield = 10071 
    and c.datevalue in (select min(datevalue) from customfieldvalue where customfield = 10071)

다른 팁

Run the query and sort by the date field. First row is the max or min

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top