atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

[Jira] Usage of jira.add_version

Open Hellgringo83 opened this issue 9 months ago • 1 comments

I try to add a new version. First I can see that the documentation and the implementation of add_version are different (different names for function parameters).

There is a parameter project_key and projecet_id. I know that one of this is deprecated so I just give the same project key to both.

Using this example code results in an exception:

strPrjId = 'TST'

version_data = {
            'name': "TestVersion",
            'project': strPrjId,
            'description': "Just a test description",
            'released': False
}

jira.add_version(project_key= strPrjId, project_id=strPrjId, version = version_data)

Exception: requests.exceptions.HTTPError: Invalid request payload. Refer to the REST API documentation and try again.

I didn't find any code using this method or an example.

Hellgringo83 avatar Mar 10 '25 15:03 Hellgringo83

Hi! I will add that info into doc and example. Kindly please share the usage is this cloud or or on-prem Jira ?

gonchik avatar Mar 17 '25 05:03 gonchik