Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,639,444
Community Members
 
Community Events
196
Community Groups

Is it possible to update hidden field with Jira REST Api ??

Edited

In a Create/Update combination we store an ID in an issue.

If the ID is there, we know we have to update. If there is no ID of course we do a create.

If went to field configuration and pressed hide the ID field.

In our test environment if I want to update the Id field now I get following error:

customfield_11400":"Field 'customfield_11400' cannot be set. It is not on the appropriate screen, or unknown.

 Before I could update the Id field without any problem.

If you hide a field, can you no longer update it ?? 

What would really be weird, because it is just a GUI thing. JIRA REST Api only works on database level I always thought ? 

This is my class:

public class OrderpositionCustomFieldsACC extends MainFields {

:

@JsonProperty("customfield_11400")
String Id;

:
}

2 answers

1 accepted

0 votes
Answer accepted
Matthias Gaiser [K15t]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 04, 2021

Hi @Albert Cameron ,

the Jira REST API also is based on the same settings you configure for the ui. If some field is not on the create/edit screen, you can’t set the value.

On Cloud, there’s an additional parameter to overrideScreenSettings. However, on Server, there’s no such thing.

I guess that was not the answer you hoped for. You might want to checkout Scriptrunner behaviors to hide fields. I haven’t really used it myself, but I think that might be able to help you.

Cheers,
Matthias

Aha. Ok. It is not possible to update hidden field with Jira REST Api because it behaves more like a normal Jira user. It is possible to update hidden field with Jira Core Api though like when using ComponentAccessor class .

1 vote
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 04, 2021

Dear @Albert Cameron ,

so its is.

One work-a-round: Create a "hidden" transition to you workflow, that only the API user can execute. Add to the transition screen your ID field.

Alternatively you could call

POST /rest/screens/{screenId}/tabs/{tabId}/fields

to add the field to the screen, then update your hidden ID field and with

DELETE /rest/screens/{screenId}/tabs/{tabId}/fields/{id}

remove the field again (hide it).

So long

Thomas

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events