Hi All,
Background:
On my company's platform, there is a built-in integration with JIRA.
It should open a JIRA ticket whenever an alert is triggered on our product.
Issue:
I configured the integration using my own email, an API token, configured the JIRA host and project key.
I simulated an alert- and a ticket was created.
Then i created a new email user- a generic one for the sake of the alert report.
The user was given project admin role, admin org permission and in general the same permissions as my own user.
I created a new API token and configured similar parameters - however when i simulated an alert, the following error appeared:
Client request(POST https://<host>.atlassian.net/rest/api/2/issue\) invalid: 400 Bad Request. Text: "{"errorMessages":[],"errors":{"reporter":"Specify a valid value for reporter","assignee":"Specify a valid value for assignee
Again,
Same permissions were granted, same configuration was performed.
In addition,
I tried to open a ticket using curl command with the exact same permissions and it worked!
curl -D- -u <USER:API TOKEN> -X POST -H "Content-Type: application/json" \
--data '{
"fields": {
"project": {
"key": "<PROJECT KEY>"
},
"summary": "Issue Summary",
"description": "Issue Description",
"issuetype": {
"name": "Task"
}
}
}' "https://<HOST>.atlassian.net/rest/api/2/issue/"
I would appreciate your assistance with identifying the issue.
Thanks,
Udi
Hi @Udi Ben Hamo ,
Welcome to the community!
Did you use the new account to create a ticket via the UI in the project you've specified in the JSON? If not please try, you probably run into the same error
Looking at the error message the new account may not be the reporter (which implies that it is missing the create issues permission). The other error implies that an assignee should be set (take a look at the field configuration is assignee is required).
Rudy
Hi Rudy,
Thank you!!
I am able to open a ticket using the UI with the same user.
As i mentioned in the ticket description- i'm also able to open a ticket using a simple API call.
I also have the 'create issue' permission.
I've checked the permissions of the problematic user and my user- both have the exact same permissions.
Thanks,
Udi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Udi Ben Hamo , how are you ?
Are you using a existing email or atlassian ID in reporter and assignee ?
Normally, in API's i use Atlassian ID to set the users (in CSV file works no problems with emails LOL)
Try to use the Atlassian Account ID for the Rest
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carlos,
In our code- we map both the assignee and reporter as accountID.
It works properly on my user, i just can't seem to find the difference.
Thanks,
Udi
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.