Forums

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

Unable to assign a Jira ticket to user with AccountID using Rest API

Gopi Tholeti July 11, 2022

Hi all, 

I started to create a process in which a Jira ticket is created and assigned to another person.

The sequence is as follows:

User fills a Google form>>App Script trigger works on new row insert>> Jira ticket created with Rest API and assigns to specific person >> User and assignee get notified.

I am trying to add Assignee to a Jira ticket with the help of AccountID using Rest API. 

I am successful in creating it but the App script is failing specifically for long AccountIDs.

For example, a Jira ticket is being created and adding an assignee with help of accountID which looks like 5f3becff3ab35c003f30d837.

But failed to create with accountID which looks like 71121:6b1f7b04-6e9e-4276-b4d8-4d7b1678e327.

 

Any suggestions on how to fix this issue.

 

Many thanks,

 

1 answer

1 accepted

0 votes
Answer accepted
Chu Dam
Community Champion
July 12, 2022

Hi, 

Here is the API doc: accountId is the param to use cause all others have been deprecated... 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-assignee-put

accountId
string

The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. Required in requests.

Max length: 128

There is also some needed permissions to assign issues, maybe the failing user doesn't have enough permissions: 

Permissions required:

I hope this helps a bit.

Cheers,
Dam. 

Suggest an answer

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

Atlassian Community Events