• We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding suggestion.

      Using JIRA's REST api, you can't set the Organization field using edit:
      https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-editIssue

      When trying to set it, it throws a 500 Internal Server Error.

            [JSDSERVER-4353] Add REST support for setting Organization on a ticket - Server

            Used this to get the id.  Just did it in my browser.

             

            https://<yoururl>/rest/servicedesk/1/organisations/project/10003/search?query=<name of org>

            Cory Galloway added a comment - Used this to get the id.  Just did it in my browser.   https://<yoururl>/rest/servicedesk/1/organisations/project/10003/search?query=<name of org>

            Just answered my own question - it was probably a dumb one, but I am new to the JIRA REST APIs.

            I also had to do a lot of trial and error for this, and undoubtedly would have burned more without your post Nick. 

            The format that worked for me was. Hopefully this helps someone.

            {
                    "fields": {
                        "customfield_11300": [8]
                    }
                }
            

             

            Brett Larson added a comment - Just answered my own question - it was probably a dumb one, but I am new to the JIRA REST APIs. I also had to do a lot of trial and error for this, and undoubtedly would have burned more without your post Nick.  The format that worked for me was. Hopefully this helps someone. {          "fields" : {              "customfield_11300" : [8]         }     }  

            @Nick Menere - That doesn't seem right: shouldn't the format include the custom field ID? is this through the JSD or JIRA API?

            Brett Larson added a comment - @Nick Menere - That doesn't seem right: shouldn't the format include the custom field ID? is this through the JSD or JIRA API?

            FYI, this is the format needed - (needed a lot of trial and error)

            {
                "fields": {
                    "Organizations": [1]
                }
            }
            

            Nick Menere added a comment - FYI, this is the format needed - (needed a lot of trial and error) { "fields" : { "Organizations" : [1] } }

            It may be useful to know that the JSD REST API has some resources to request all organizations, as well as all organizations for a Service Desk. In a REST context, this may assist in mapping a name to an id?

            In regards to the implementation of edit issue taking only ID's, this is something that could potentially be expanded in the future, however the current implementation is the simplest way to ensure complete compatibility with how the Custom Field works, as all issue data for this field is stored by ID.

            Matthew McMahon (Inactive) added a comment - It may be useful to know that the JSD REST API has some resources to request all organizations, as well as all organizations for a Service Desk. In a REST context, this may assist in mapping a name to an id? In regards to the implementation of edit issue taking only ID's, this is something that could potentially be expanded in the future, however the current implementation is the simplest way to ensure complete compatibility with how the Custom Field works, as all issue data for this field is stored by ID.

            Thanks for the reply Matthew McMahon.

            Figured it out in the end.

            The difficulty with the implementation of the Organisation field is that:

            1. There is no current method in the REST API to get an Organisation ID based on the Organisation Name. See https://docs.atlassian.com/jira-servicedesk/REST/cloud/#servicedeskapi/organization-getOrganization
              1. You can page through all the Organisations searching based on Organisation name, but that's far from optimal
            2. So knowing the Organisation ID value, required for the Organisation field is not straight forward.

            Setting the Organisation Name OR the Organisation ID in the Organisations field would make the Organisations field much easier to use via REST.

            My current workaround is to ADD the Organisation again as a Customer to JIRA Service Desk via REST. Which returns the Organisation ID on success. This is then used to set the Organisation field via REST.

            Not pretty, but it works.

            Justin Freeman added a comment - Thanks for the reply Matthew McMahon. Figured it out in the end. The difficulty with the implementation of the Organisation field is that: There is no current method in the REST API to get an Organisation ID based on the Organisation Name. See https://docs.atlassian.com/jira-servicedesk/REST/cloud/#servicedeskapi/organization-getOrganization You can page through all the Organisations searching based on Organisation name, but that's far from optimal So knowing the Organisation ID value, required for the Organisation field is not straight forward. Setting the Organisation Name OR the Organisation ID in the Organisations field would make the Organisations field much easier to use via REST. My current workaround is to ADD the Organisation again as a Customer to JIRA Service Desk via REST. Which returns the Organisation ID on success. This is then used to set the Organisation field via REST. Not pretty, but it works.

            justin222644402 the Organisation custom field has been updated to properly support the JIRA Edit Issue REST API, as described at https://docs.atlassian.com/jira/REST/server/#api/2/issue-editIssue

            You will need to know the custom field id, and organisations value can be set by using Organisation IDs

            Matthew McMahon (Inactive) added a comment - justin222644402 the Organisation custom field has been updated to properly support the JIRA Edit Issue REST API, as described at https://docs.atlassian.com/jira/REST/server/#api/2/issue-editIssue You will need to know the custom field id, and organisations value can be set by using Organisation IDs

            Justin Freeman added a comment - - edited

            Matthew McMahon thanks for releasing this, so what is the REST API to set an Organization on a ticket? Any docs?

            Justin Freeman added a comment - - edited Matthew McMahon thanks for releasing this, so what is the REST API to set an Organization on a ticket? Any docs?

            This has been fixed in JSD Server version 3.3.2. If you require this in Cloud, please watch the ticket JSD-4875 for updates

            Matthew McMahon (Inactive) added a comment - This has been fixed in JSD Server version 3.3.2. If you require this in Cloud, please watch the ticket JSD-4875 for updates

            RomeoA added a comment -

            Up?

            RomeoA added a comment - Up?

            RomeoA added a comment -

            Hello Team,

             

            Update please? this really delaying our transition because we cant transfer our existing ticket on TEAM SERVICE DESK PLUGIN to JSD organization.

             

             

            Regards,

             

             

            Romeo

            RomeoA added a comment - Hello Team,   Update please? this really delaying our transition because we cant transfer our existing ticket on TEAM SERVICE DESK PLUGIN to JSD organization.     Regards,     Romeo

            billing85 added a comment -

            Any update?

            We really need this feature to be available.

             

            billing85 added a comment - Any update? We really need this feature to be available.  

            Alex Leg added a comment -

            UP ?!?!?

            Alex Leg added a comment - UP ?!?!?

            Hello,

            We also need this functionality at our organization. We have an external system that can generate customer requests in SD, but have no way to create these with the right organizational properties. Looking forward to seeing this implemented.

            Thanks,

            Luis

            Luis Rivera II added a comment - Hello, We also need this functionality at our organization. We have an external system that can generate customer requests in SD, but have no way to create these with the right organizational properties. Looking forward to seeing this implemented. Thanks, Luis

            RomeoA added a comment -

            Hello Guys,

             

            We really need this feature. We are planning upgrade JSD 3.3 we got existing tickets Desk TEAM PLUGIN its blocking our migration because Updating the organization field is not possible using REST API. We got a lot of tickets!

             

             

            Thank you,

             

            Romeo

            RomeoA added a comment - Hello Guys,   We really need this feature. We are planning upgrade JSD 3.3 we got existing tickets Desk TEAM PLUGIN its blocking our migration because Updating the organization field is not possible using REST API. We got a lot of tickets!     Thank you,   Romeo

            Alex Leg added a comment -

            Hi Gents.

            We have into production a 7.2 JIRA with JSD 3.2 with the service Desk Team plugin
            We have into pre-production a 7.3 JIRA with JSD 3.3 with the Organization feature.

            The way to migrate from 3.2 with service desk team to 3.3 with Organization is a simply a mess !

            In order to be able to do the migration between 3.2 to 3.3 and to auto update all the Legacy tickets to flag the new organisation feature on top of JIRA service desk team plugin; we need that API feature.

            We are waiting it big time.
            May I kindly ask you to update this API feature as soon as possible ? because we can't handle to update the thousand of tickets we've got into our production ....

            BR

            Alex

             

            Alex Leg added a comment - Hi Gents. We have into production a 7.2 JIRA with JSD 3.2 with the service Desk Team plugin We have into pre-production a 7.3 JIRA with JSD 3.3 with the Organization feature. The way to migrate from 3.2 with service desk team to 3.3 with Organization is a simply a mess ! In order to be able to do the migration between 3.2 to 3.3 and to auto update all the Legacy tickets to flag the new organisation feature on top of JIRA service desk team plugin; we need that API feature. We are waiting it big time. May I kindly ask you to update this API feature as soon as possible ? because we can't handle to update the thousand of tickets we've got into our production .... BR Alex  

            Hello guys,

            We are very interested by that feature.

            We have a lot of issue with different statuses that we cannot be update manually. It would be very cool to have the ability to update organization field into WIP issues via scripting.

            Do you plan to deliver this feature soon ?

            Thank you,

            Tib

            Tib (Inactive) added a comment - Hello guys, We are very interested by that feature. We have a lot of issue with different statuses that we cannot be update manually. It would be very cool to have the ability to update organization field into WIP issues via scripting. Do you plan to deliver this feature soon ? Thank you, Tib

            JP Rowan added a comment -

            I have a suggestion for how this could be implemented using the Service Desk APIs.  Currently there is the /request/{key}participant endpoint that takes an array for usernames.  Since organizations work in a manner similar to groups for request participants, what if this endpoint could accept a similar array for organizations, so that the request body would look similar to:

            { 
                "usernames": [ 
                    "username1, 
                    "username2"
                ], 
                "organizations": [ 
                    "organization1, 
                    "organization2" 
                ],
            }

            Would approaching the solution in this manner, make development any faster?  Is there anything else I can do to encourage this suggestion to be prioritized?  

            JP Rowan added a comment - I have a suggestion for how this could be implemented using the Service Desk APIs.  Currently there is the /request/{key}participant endpoint that takes an array for usernames.  Since organizations work in a manner similar to groups for request participants, what if this endpoint could accept a similar array for organizations, so that the request body would look similar to: { "usernames" : [ "username1, "username2" ], "organizations" : [ "organization1, "organization2" ], } Would approaching the solution in this manner, make development any faster?  Is there anything else I can do to encourage this suggestion to be prioritized?  

            JP Rowan added a comment -

            Considering the narrow scope of functionality the organization feature offers Service Desk, supporting the ability to set this field using the REST API would allow customers greater flexibility on how they choose to integrate this feature.

            In my companies use case, we have hundreds of organizations each that often have more than a dozen customers associated to them.  To ensure visibility across each organization we need to be able to set the organization value on all tickets, whether or not the customer choose to share with their organization on submission.  API support for this field is essential to allowing us the ability to develop a custom solution to meet our use case.

            JP Rowan added a comment - Considering the narrow scope of functionality the organization feature offers Service Desk, supporting the ability to set this field using the REST API would allow customers greater flexibility on how they choose to integrate this feature. In my companies use case, we have hundreds of organizations each that often have more than a dozen customers associated to them.  To ensure visibility across each organization we need to be able to set the organization value on all tickets, whether or not the customer choose to share with their organization on submission.  API support for this field is essential to allowing us the ability to develop a custom solution to meet our use case.

            Speaking to a Service Desk developer they say the field doesn't implement - RestAwareCustomFieldType

            Nick Menere added a comment - Speaking to a Service Desk developer they say the field doesn't implement - RestAwareCustomFieldType

              Unassigned Unassigned
              299f0f7aaa75 Nick Menere
              Votes:
              12 Vote for this issue
              Watchers:
              22 Start watching this issue

                Created:
                Updated:
                Resolved: