Jira API user access to service desk

HI,

 

I wrote an internal integration between Jira Software and Workfront, it automatically creates tasks and issues within workfront and updates the time when logged via Jira Software. Single entry point for users.

 

I'm extending that to work with our new (in testing)Jira Service Desk, our API user is a Jira Software user but not a Service Desk agent. I'm able to create the issue in workfront, I'm able to update the service desk issue with comments that it has been created.

However when I try and update a custom field in Jira Service desk I get this error.

[errors] => Array

        (

            [customfield_11502] => Field 'customfield_11502' cannot be set. It is not on the appropriate screen, or unknown.

            [customfield_10701] => Field 'customfield_10701' cannot be set. It is not on the appropriate screen, or unknown.

        )

 

The custom fields are on the correct screens, I need to update one with the id of the issue in workfront and one with the link to the issue in workfront.

 

If this because the API user is not an agent, I don't want add to the service desk agent license just to update a custom field. 

 

Secondly, other than using the project key, is there any flag through webhooks that indicates that an issue is service desk or software so I can handle them differently.

 

Thanks

1 answer

1 accepted

Accepted Answer
0 votes

Hi Dean,

Service Desk projects behave a bit differently in regards to who has access to make public comments on them.   Namely, that is only an Agent, the reporter, or possibly a user in the requested participant field.    You can see from the Setting up service desk users: Involve Jira Software or Jira Core users  that Jira Core/Software users have the ability to view issues, and add their own internal comments, but there are a whole host of other restrictions for their accounts inside a Service Desk project.

In this case, I believe this Jira Software users can't set that field because of the way service desk natively restricts an issue to be between JSD Agent(s) and the reporter.

There are a couple of other aspects that we might be able to explore to make this work, without setting this service account as an Agent.

If these fields appear on the customer request type screen, then the JSD reporter only has the ability to set those fields at the time the issue is created (at least through the portal).  Agents can update or change them later, but the JSD customers accessing the site through the customer portal typically won't be able to see or edit most fields on this issue once it is created.

I am curious to see if perhaps those fields might be something the reporter or a requested participant might be able to change via the API after the issue has been created, but I can't confirm if that is possible just yet.

In regards to your other question, I do not know of any way for the webhook to indicate what kind of Jira project this is.   The documentation on Webhooks in regards to Jira don't indicate any kind of variable that would clearly indicate the project type.

Thank you for the response, with webhooks, we ended up name with all are service desk project starting with SD and Jira with JS.

SD<project>-<number>

JS<project>-<number>

This way we can tell which is which.

Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 13, 2018 in Jira Service Desk

Jira Service Desk – Don’t be afraid, the journey begins with curiosity!

...be more productive while being fun to use at the same time. For some, getting started can be a bit intimidating. This is especially true if Jira Service Desk is your first exposure to Atlassian...

18,721 views 13 31
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you