Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update customfield with rest API

Steven Vits
Contributor
January 16, 2024

I created a customfield 'CF_SingleChoice' wit a dummy 3 values in it.

Wat I do want to archieve is an automation to populate the choices on a regular base so I can use the choice field as a Dynamic Choice.

I understoor that there is no way of archieving this within Jira automation itself so I do want to try to post the values for the customfield using the rest API.

Using https://Intance.atlassian.net/rest/api/2/field/10136 gives me a 405 method not allowed.

Anyone any suggestions please?

1 answer

0 votes
Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2024
Steven Vits
Contributor
January 17, 2024

Thank you for your most appreciated reply @Nikola Perisic . 

The suggested articles are not usefull for this topic. I want to change a a choice field. when I do a get action to https://instance.atlassian.net/rest/api/3/field/

the part of the reply is:

{
        "id": "customfield_10136",
        "key": "customfield_10136",
        "name": "Test_V_SelectProject",
        "untranslatedName": "Test_V_SelectProject",
        "custom": true,
        "orderable": true,
        "navigable": true,
        "searchable": true,
        "clauseNames": [
            "cf[10136]",
            "Test_V_SelectProject",
            "Test_V_SelectProject[Dropdown]"
        ],
        "schema": {
            "type": "option",
            "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
            "customId": 10136
        }
    }
I do not see any relation to the options that should appear in the drop down when I use this customfield in an pop up of a manual action.
Updating the related choices is what I do want to achieve to be able to make the choices dynamic adaptable.
I managed once to update another customfield using the HTTP post action using next code in the field section:
"customfield_31415": [
      {
        "workspaceId""a2f6f63d-e934-495d-fd64-126e959f61c9",
        "id""a2f6b63d-f9f4-495d-ad64-126f959c61c9:60573",
        "objectId""60573"
      }
    ]
As I see now I need to find the related choice values to br able to update them.
thanks in advance.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events