-->

Welcome to our Coding with python Page!!! hier you find various code with PHP, Python, AI, Cyber, etc ... Electricity, Energy, Nuclear Power

Wednesday, 17 July 2019

JIRA 5.0, REST API, jira-python, Start/End Date

  1. How to create issues with jira-python or REST API so I could set the Create/Resolve/Close date correctly?
  2. How to set status of the issue created from the above?

Saw this awesome REST API library/wrapper, jira-python, at Atlassian Summit 2012. It seems to give me what i need to perform a heavy migration work of mine.
I think the external project import does not allow multiline description imports, so i have chosen to try using jira-python for my migration work.
How to create issues with jira-python or REST API so I could set the Create/Resolve/Close date correctly?

You have to set the create date in issue creation -- JIRA does that for you. Also, it automatically handles date updating when you transition issues, so you don't have to worry about that either. Take the date fields out of your fields dict and you should be fine.

How to set status of the issue created from the above?

When you create an issue, JIRA will use the issue type's associated workflow to determine what its status is. Once an issue is created, you can transition it to different statuses using the transitions() and transition_issue() methods.

In your case, it sounds like you want to preserve the original times and dates that issues were created. If so, then using the REST API isn't what you want; it uses the same access rules any real user has when they interact with the web application. You'll probably want to do a backup/restore if you want to preserve all the original information -- see http://aclabink.com/21047061/how-to-set-status for details on that.

No comments:

Post a Comment

Thanks for your comments

Rank

seo