jira-python - how do you update the fixVersions field? -
i'm not sure i'm doing wrong here, , hoping else has same problem. don't error, , json matches should correct both on jira's docs , jira-python questions online. versions valid jira versions. have no problem doing directly through api, re-writing go through jira-python cleanliness/ease of use.
this clears fixversions field in jira.
issue=jira.issue("tkt-100") issue.update(fields={'fixversions':[{'add': {'name': 'add_me'}},{'remove': {'name': 'remove_me'}}]})
i can add new version fixversions using issue.add_field_value(), won't work, because need add , remove in 1 request history of ticket.
issue.add_field_value('fixversions', {'name': 'add_me'})
any ideas?
here's code example of how got working comes across later...
fixversions = [] issue = jira.issue('issue_key') version in issue.fields.fixversions: if version.name != 'version_to_remove': fixversions.append({'name': version.name}) fixversions.append({'name': 'version_to_add'}) issue.update(fields={'fixversions': fixversions})
Comments
Post a Comment