How to set overrideScreenSecurity=true with Python

Francesco R
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2019

I'm using jira 2.0.0 Python modules to set some customfields.
All is working but for one customfield that is not in the edit screen of the issue I'm getting the message "Field 'customfield_xxxx' cannot be set. It is not on the appropriate screen, or unknown." I've checked that I can get rid of this error setting overrideScreenSecurity tu true but I'm not able to do it using jira for Python.
I get my issues in this way:

issues = jira.search_issues(jql, start_idx, block_size)
for issue in issues:
    issue.update(fields={'customfield_10740': 'my value'})

How can I set this parameter ?

Thank you in advance.
Francesco

 

1 answer

1 accepted

0 votes
Answer accepted
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 2019

Hello @Francesco R 

 

The error message "cannot be set. It is not on the appropriate screen, or unknown", means that the field is not on the edit screen. You will need to add it to the screen.

I think the python module work like the API REST, so you can only do what you can do on the UI.

 

Hope this helps

Francesco R
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2019

Yes, it's not on the edit screen and if I put the customfield on it, the python script works.
But I read that to get rid of this problem (I don't need to put the cf on the screen, it's a "service" customfield) I could set on the API rest the parameter with something like

/rest/api/2/issue/' + issueKey + '?overrideScreenSecurity=true

but I'm not able to do this with jira Python modules

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2019

This security parameter seems to work only for app according to the documentation

 

Connect app users with admin permissions (from user permissions and app scopes) can override the screen security configuration using overrideScreenSecurity and overrideEditableFlag.

 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-rest-api-3-issue-issueIdOrKey-put

Like # people like this

Suggest an answer

Log in or Sign up to answer