I am trying to create a servicedesk request with a specified Organization to set on the request when it is created. I tried to use organizationId as a field in my request json but it is not recognized. I am able to create a request otherwise without an organization, so how can I create one with an Organization, or set the Organization afterward?
I am able to use /rest/servicedeskapi/servicedesk/${JIRA_PROJECT_ID}/organization to get the organization IDs associated with the project. I do get a warning that the API is Experimental.
Using JIRA Service Desk 4.4.1.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>Unrecognized field "organizationId" (Class com.atlassian.servicedesk.api.rest.dto.domain.request.RequestCreateDTO), not marked as ignorable
at [Source: org.apache.catalina.connector.CoyoteInputStream@2852b1e1; line: 1, column: 280] (through reference chain: com.atlassian.servicedesk.api.rest.dto.domain.request.RequestCreateDTO["organizationId"])</message><stack-trace>org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "organizationId" (Class com.atlassian.servicedesk.api.rest.dto.domain.request.RequestCreateDTO), not marked as ignorable
Chris,
Organization is just a custom field in Jira.
You would just add something similar to this to your API call:
# Set Organization (using custom field id explicitly)
issue.update(fields={'customfield_12100': [2]}) # 2 is the ID of the organization on the project
Well of course it is. Thanks, didn't realize that.
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.