I have a Board named ASDF, In that board under Relaeses tab I have a Version named: QWER. This version has 3 issues.
I want to change the status of the version to "Released" if all the issues are in "done" state. I don't know how to change the status to "Released".
I am trying to do this using JIRA-Python REST-API. I am also open to CLI method.
To update release status you can use the following Rest API with PUT method.
PUT http://{PutYourDomainHere}:Port/jira/rest/api/2/version/{id}
Body Example
{
"self": "http://{PutYourDomainHere}:Port/jira/rest/api/2/version/10000",
"id": "10000",
"description": "An excellent version",
"name": "New Version 1",
"archived": false,
"released": true,
"releaseDate": "2010-07-06",
"userReleaseDate": "06/Jul/10",
"projectId": 10000
}
So, if you are going to use JIRA-Python-API:
You'll need to create a function "release_version" to update release it will be similar to "create_version" with add "id" and change the Rest method to be PUT instead of Post
So, to achieve your scenario:
You will use "version_count_unresolved_issues
(id)" to get to the list of unresolved issues for a specific version ID, if it return 0 ---> execute "release_version"
I hope this will help
I tried this and it was working. I couldn't complete it, because i could not find the Version ID. I have the name for each project and versions. I am trying to figure out the ID's. Once I complete it i will mark yours as answer. Thank you for the help!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you tell what is "self". Most of the functions created are having "self" as one of the parameters. What should i define it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use self to represent the instance of the class
you can find more information here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is it possible to find the IssueID if it is unresolved in a version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
class myJIRA(JIRA):
def release_version(self, name, project):
version = self.get_project_version_by_name(project, name)
if version:
version.update(released=True)
This is new method "release_version" in redefined class
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@tony cameraman please check out this previously answered question to see if it resolves your question: https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-release-a-version-using-REST-api/qaq-p/563559
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want more information then visit https://appicsoftwares.com/react-native-app-development
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.