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
I am trying to add a "Message Custom Field (for view)" to my project. I am able to create the custom field through the REST API, but I am unable to set the default value programmatically. Since this is a read-only field, it will not be displayed unless the default value is defined.
Hi Anh-Minh,
I believe you're running into the limitation from the API. Take a look at the Suggestion Add, edit, or delete custom fields in REST API:
At the moment, it's possible to get some info by retrieving editmeta :
http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/editmetaBut you cannot add, edit, or delete custom fields via JIRA REST API (as you can in the admin section).
The Suggestion includes a workaround that may work for you:
The third party plugin Jira Customfield Editor provides REST endpoints for the CRUD operations on custom fields.
Please be sure to vote on the issue to add impact and add your use case to the comments.
Cheers,
Branden
Hi Branden,
Thank you for the response! I was hoping that your response would be different :/
While looking for other possibilities, I discovered the "Text Field (read only)" custom field. The description says that the value for this field can only be set programmatically. I tried setting the value via POST and PUT calls but was unsuccessful. Can you help explain what type of language I would need to set the value for this custom field?
Thank you in advance for your time.
A-M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are using JSON the request body should be like this :
{
"fields": {
"customfield_12345": "your text field value here.."
}
}
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.