Forums

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

Error trying to set Organization field value via API - Field not found

Luciana Dimauro November 20, 2024

Hello,

we want to use JSM to register some service request on a confirmation of an event.

This is the scenario:

A customer create an event, that is "assigned" to an agent. This event should be registered as service request on our JSM project. 

The customer is registered on JSM whit the Customer role and belongs to an Organization (he has permission to create an issue as Customer on the Customer Portal, has not access to product).

We can open a  service request  via API using an atlassian account who has Service Desk Team Role (an agent) or Admin role  but creating the issue we are not able to set the Organizations value , 

The error shown is: 

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

 

Field Organization exists in in the field schemes that we are using to create and edit the issues.

We tried to use both organization id and the value as a string .

If I go to see on the permission helper , Service Desk Team and Administrators can create and update issues (customers don't have this ability, but it's a secondary concern)  .

I've searched in the community but I don't understand how to solve this problem.

Anyone can help?

Thanks ,

Luciana

 

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2024

Hi @Luciana Dimauro 

You need to set the id in an array as a number.

The organization field is capable of containing other organization values, so as an array it just needs the value of the organization id. e.g

Example:

Where customfield_10500 is the Organization field and ID 4 is the Id of the org.

--data '{
      "fields": {
           "summary": "This is createdvia an API call",
           "issuetype": {
                "id": "10285"
                                 },
           "project": {
                "key": "xxx"
                            },
           "customfield_10500": [4]
      }
}'

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events