We have selectList( single select) cusotm filed on JIRA, which we wanted to show list of below values coming form the Pyhton script.
['10.1.25.83', '10.1.32.14', '10.1.31.38', '10.1.32.16', '10.1.32.17']
Python code snippet:-
code:-
p = "//vs_ldc_xxxxx/SSG/ZFSA/UPP1/Setups/Releas/Main Systemsup" // This shared path giving us all the above list values.
print(p)
out = os.listdir(p)
arr = []
for i in out:
arr.append(i[4:])
print(arr)
"customfield_10900": [arr] // Here trying to update values in JIRA filed
But gives error.
raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 400 url: http://IPaddress/rest/api/2/issue/11628
text: Could not find valid 'id' or 'value' in the Parent Option object.
-------------
Then I tried in below ways to update the JITA feild vaues in different ways but still no luck.
1)-->"customfield_10900": [arr]
2)-->issue.update(fields={'customfield_10900': '1.1.2.3'})
3)-->issue.update(fields={'customfield_10900': [{'value':'1.1.2.3'}]})
4)-->issue.update(fields={'customfield_10900': [{'value': '10.1.2.3'}]})
5)-->issue.update(fields={'customfield_10900': [{'value':'1.1.2.3'},{'value':'1.1.2.4'},{'value':'1.1.2.5'}]})
Please help me to fix this issue.
Thank you in advance,
Dev G
This looks like the select list does not have the options defined for the values you are trying to add to the issue.
I also note that some of your data is arrays - select lists can only hold a single value, so the sets of values are never going to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.