Hi,
I'm trying to update a custom field (Labeling Status) in the issue using the Python Jira library (https://pypi.org/project/jira/). When I'm trying to update a custom field, I got errors
jira.issue("XXXXXXXXX").update({'cf[24954]': 'to_be_labeled'})
`Field 'cf[24954]' cannot be set. It is not on the appropriate screen, or unknown.`
I googled for a long time, and most answers are about the particular custom fields that are not in the create/edit screen. However in my case, I do see those custom fields editable on the web page, but just not on the default screen. I've also ruled out some other possible problems:
Anyone know what might be the problem?
Hi @Yunao Liu ,
well the error pretty much says it.
`Field 'cf[24954]' cannot be set. It is not on the appropriate screen, or unknown.`
if the field exists (which I assume it does) it's just not on the edit screen of the issue type that you are trying to edit.
Can you verify that the Edit Screen of the issue type that you are editing contains your custom field?
The non-default tab shouldn't matter.. it's still part of the screen but to make sure it's not a bug you can always move it to the default one for a test.
Hey @Yunao Liu
i've just gone through the documentation quicky and this just seems to call the REST api for updates.
Can you try setting the field using customfield_24954 ?
so the command would be:
jira.issue("XXXXXXXXX").update({'customfield_24954': 'to_be_labeled'})
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I've done a little more testing on my local instance and I was able to set a custom field using the following syntax:
from jira import JIRA
jira_server='xxxxx'
username='xxxxx'
password='xxxxx'
aj = JIRA(basic_auth=(username, password), options={'server': jira_server})
issue = aj.issue('xxxxx')
print(issue.fields.customfield_10902)
issue.update({'customfield_10902': 'xxxx'})
This gives me a clean update of the customfield so as I expected you'll have to use the customfield_<yourid>
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.