PythonP
PythonP

Reputation: 31

Newly created issues (JIRA and python)

I am working on simple app that uses python to access Jira. I mange to get all the issues How to get the only newly created issues ?

from jira import JIRA

jira = JIRA(basic_auth=('username', 'password'), options={'server':'https://MY_JIRA.atlassian.net'})

got = 50
total = 0
while got==50:
    issues = jira.search_issues('project=JA', startAt = total)
    ....
    got = len(issues)
    total += got

Upvotes: 1

Views: 83

Answers (1)

jolyonruss
jolyonruss

Reputation: 1840

Getting newly created issues will involve you creating a new JQL query - here's a get started with JQL page from the Atlassian blog.

From the examples at the bottom it looks like you can query by relative date like this:

assignee is EMPTY and created < -1d

I hope that helps.

Upvotes: 2

Related Questions