JQL - Get all issue based on project from result jql request

435 views Asked by At

I need to get all project issue from dynamic jql issue.

Ex: project in (issue updated -5m)

It's there a way to do that in JQL ?

2

There are 2 answers

0
Wilco van Esch On

If I understand correctly from your additional clarification that you want a list of all outstanding tickets from any projects in which an issue has just been updated, then you can't do it via JQL in JIRA's issue search, but you could use the API. An example using jira-python library in Python 2.7:

just_updated = jira.search_issues('updated >= -5m')
for issue in just_updated:
   issues = jira.search_issues('project = "' + issue.fields.project.key + '" and status not in (Resolved, Closed)')
   for each in issues:
      print each

This spits out the issue keys you want, which you can then turn into an HTML page with issue links or a CSV with issue details or whatever you need.

0
Andenthal On

This will work if you're getting your results via an HTTP GET:

http://yourserver.com/rest/api/2/search?jql=project=YOUR_PROJ%20AND%20updated%20>%3D%20-5m

Replace "YOUR_PROJ" with your project's short name (key).