2

We have jirapython integration library. We create issue through python script.like create_issue. But same as i want remove issue function. I referred many docs,blogs and official site. But i did not get this solution. Can anyone pls help me this issue.

1

1 Answer 1

4

This is pretty trivial. If you want to delete an issue, you need the issue object. One way to obtain the object is via jira.create_issue() function that you mentioned in which case you can delete it as follows:

issue = jira.create_issue(...)
...
issue.delete()

Alternatively if you happen to know the ID of the issue you want to delete you could delete it like so:

issue = jira.issue("EXAMPLE-244")
issue.delete()

If you don't know the IDs of the issues you want to delete, you might first have to find the issues via the jira.search_issues() function. This would look like:

issues = jira.search_issues('project="%s" AND summary~"%s"' % ("project_key", "issue title"), maxResults=100)

for issue in issues:
    issue.delete()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.