I'm trying to find a way to add values to a single select list via automation or workflow. Is there any way to currently do this? I've searched but unable to find a solution so far. I found the following which matches my use case but am not sure how to implement: https://stackoverflow.com/questions/22892537/how-to-add-new-values-to-select-list-field-in-jira-dynamically-or-using-plug-in/23198416#23198416
Hi @David Loszewski ,
Using automation or workflow post-function are easy ways to accomplish what you are looking for.
Are the values predefined (always the same) or do they come from a different field?
https://confluence.atlassian.com/automation/advanced-field-editing-993924663.html would give you a hint on how to update a field with automation.
You can set the updated field with a permanent field, iterate an if-else based in some values so the field is updated based on another or copy value from another field.
The native post-function is a bit restricted on updating fields, so it will depend on which plugins you may have
@Samuel Bartolome I think your response assumes that I already have the values in the field. I may not have been clear. I'm trying to add an option/value to a single select list which, typically this is done manually through Issues -> Custom Fields -> <Field in question> -> Contexts and Default Values
I'm trying to accomplish the same thing through automation and/or addon script.
The following is my use case:
1. Single Select List Custom Field: Customers
2. Text Field: New Customer
When a person enters a form with a value in New Customers, I want that value to be added as a list option on Customers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure you can achieve that with automations, but probably you can do it with Scriptrunner as a listener maybe.
In Scriptrunner there is already a build-in option (on-prem) to update values of fields in bulk, so with that and the listener (if available in Cloud), it may do the trick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
jira cloud -> automation -> action -> Send web request
Request URL: https://yoursite.atlassian.net/rest/api/3/field/customfieldID/context/contextID/option
Headers:
Authorization: ******
Accept: application/json
method: Post
web request body: Custom data
Custom data:
{
"options": [
{
"disabled": false,
"value": "new option value"
}
]
}
please refer to this link: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
jira cloud -> automation -> action -> Send web request
Request URL: https://yoursite.atlassian.net/rest/api/3/field/customfieldID/context/contextID/option
Headers:
Authorization: ******
Accept: application/json
Method: Post
web request body: Custom data
Custom data:
{
"options": [
{
"disabled": false,
"value": "new option value"
}
]
}
please refer to below links:
Send web request with Automation: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
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.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.