Hi all, I am writing a Python script that uses the Jira API to retrieve an issue's changelog history items. Each item has the following schema:
{'field': 'Fix Version',
'fieldtype': 'jira',
'from': None,
'fromString': None,
'to': '27765',
'toString': 'Version 1'}
I want to use the 'field' value to look up other information about the field being changed. When I use jira.fields() to retrieve information about all Jira fields, each field has the following schema:
{'id': 'fixVersions',
'name': 'Fix Version/s',
'custom': False,
'orderable': True,
'navigable': True,
'searchable': True,
'clauseNames': ['fixVersion'],
'schema': {'type': 'array', 'items': 'version', 'system': 'fixVersions'}}
The problem is that neither of the available identifiers in the above schema exactly matches the value in the changelog history item ('Fix Version' in this example). How do I perform the lookup here?
Cheers,
Intresting... I would have said you always match on the ID.
Maybe this Has nothing to do with it ... but if you treat the "/s" like it has been escaped, that name "Fix Version" matches what I see as the "Field" in the changelog
{ "id": "fixVersions", "name": "Fix Version/s", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "fixVersion" ], "schema": { "type": "array", "items": "version", "system": "fixVersions" }
So I applied the same thinking to "Component/s" and "Component" and the theory holds up...
Lets go with that :-) ... "/s" is escapeed Or ignored when you match field names
{ "id": "components", "name": "Component/s", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "component" ], "schema": { "type": "array", "items": "component", "system": "components" }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.