Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I overrideScreenSecurity when setting a field value (Cloud)?

Randy
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.
November 22, 2016

When I try to update a field via the issueInput binding what does not exist on any of my screens (by design), i get the following error.  How do i overrideScreenSecurity so that "hidden" fields can be set?

I'm using ScriptRunner for JIRA Cloud.

Thanks!

 

2016-11-21 19:09:28,388 INFO - Serializing object into 'interface java.util.Map'
2016-11-21 19:09:28,390 INFO - PUT /rest/api/2/issue/80258 asObject Request Duration: 326ms
2016-11-21 19:09:28,403 ERROR - assert resp.status == 204
       |    |      |
       |    400    false
       status: 400 -` Bad Request
       body: [errorMessages:[], errors:[customfield_15500:Field 'customfield_15500' cannot be set. It is not on the appropriate screen, or unknown.]]

 

 

1 answer

1 accepted

4 votes
Answer accepted
Jon Mort _Adaptavist_
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.
November 22, 2016

Hi Randy,

This is a deficiency with the Modify Issue post function we hope to have addressed shortly. To work around it use the Run Script function and use the overrideScreenSecurity query param. For example:

def resp = Unirest.put("/rest/api/2/issue/${issue.key}")
        .queryString("overrideScreenSecurity", true)
        .header("Content-Type", "application/json")
        .body(body)

Regards,

Jon

Randy
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.
November 23, 2016

Thanks Jon!

Asha Kumari September 12, 2018

I tried the override setting but still getting the same error.

Randy
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.
September 14, 2018

@Asha Kumaripost your script

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events