You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
This question is in reference to Atlassian Documentation: Flagging an Issue
I would like to be able to update the flag state on an issue via the api. How can this be done?
There is a field called Flagged. It is a checkbox type field. There is a single value by default, Impediment. The field is checked for null status. If the field is null
, the issue is not flagged. If the field is not null
, the issue is flagged.
You would use the REST API for this. Examples are here – https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue.
You'll either need to know the field ID (customfield_10000
) or you need to to script the discovery of the field by searching the metadata – https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-discovering-meta-data-for-creating-issues.
An example of setting a custom field while creating the issue over API –
curl -D- -u fred:fred -X POST --data {"fields":{"project":{"key": "TEST"}, "summary": "Always do right. This will gratify some people and astonish the REST.", "description": "Creating an issue while setting custom field values", "issuetype":{"name": "Bug"}, "customfield_10000": [{"value": "Impediment"}]}} -H "Content-Type: application/json" http://localhost:8090/rest/api/2/issue/
{ "fields": { "project": { "key": "TEST" }, "summary": "Always do right. This will gratify some people and astonish the REST.", "description": "Creating an issue while setting custom field values", "issuetype": { "name": "Bug" }, "customfield_10000": [ {"value": "Impediment" }] } }
This no longer appears to work. I would post exactly what I'm seeing but this idiotic form won't let me enter json.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I spent like 3 hours trying to figure it out and it always gave back "Field 'customfield_10021' cannot be set. It is not on the appropriate screen, or unknown.". To fix it, simply click on Settings Icon -> Issues -> Custom Fields. Search for "Flagged" click on "Screens", Add or remove associated screens" and just add it to all screens. Then it works perfectly.
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.