I want to get all the issues that has been updated by changing their priority to "High" since given date, say "2019/06/01".
Thank you for any advice.
Hi @Jan Nowak ,
If you want issues that had their statuses changed to High, do I assume they are still high or these are changed back from high to another status?
If they remain in high status then you can try the below in the search issue page:
Updated >= "2019/06/01" AND priority = high
If they are changed back it gets tricky because the closest you get is (the JQL below is estimated and may not work so test):
Updated >= "2019/06/01" AND (priority = high OR priority WAS high)
You still have operators that can be used to dig in deeper with operators like (Before, After, On, e.t.c.) however this would require you know when this was changed as well else issues that were created a long time ago may pop up.
I would use 2 operators for changes on the specified day and one for changes after that day:
Updated >= "2019/06/01" AND (priority = high OR (priority was High ON startOfMonth()) OR priority was High AFTER startOfDay() )
If you cannot still find the correct query for yours you may want to consider checking the database changeitem/changegroup tables to pull this information.
Cheers.
Hi @Ismael Jimoh ,
Thank you for the answer. I want to get issues:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jan Nowak
With the standard JQL, you should be able to find issues that changed status to high like this:
Updated >= "2019/06/01" AND (priority = high and priority was not high BEFORE startOfMonth() )
The above should give you all issues that are currently in the high status whose status changed around the date you specified (you should be able to replace the startofmonth() with a date).
Also, you can run a REST API JQL search using this API
Hope it helps.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jan Nowak
With the standard JQL, you should be able to find issues that changed status to high like this:
Updated >= "2019/06/01" AND (priority = high and priority was not high BEFORE startOfMonth())
Also, you can run a REST API JQL search using this API.
Hope it helps.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For anyone in the future:
To get the right string for url just copy from browser whenever you search within jira with jpq filter after `?` like: `?jql=....` or may export to xml and inside xml there is the encoded string.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jan Nowak
The basic API call that you would use is
/rest/api/3/search?expand=changelog&jql=project=XXX AND updated > "2019-06-01" AND ...
The important bit is expand=changelog which gives you the history of each issue. Add whatever JQL bits you need to specify the project, date etc.
Then, you will need to iterate through each returned issue, a C# example below will show you the structure of the JSON you need to work through
foreach (var item in json.issues)
foreach (var histories in item.changelog.histories)
foreach (var history in histories.items)
You would be checking for
history.fieldId=priority and history.toString=High
I hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jan Nowak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.