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

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

Accepted Answer
3 votes

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

Thanks Jon!

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

432 views 7 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you