Hello Team,
How can we create a ticket from one JSM Instance to another JSM instance using Webhooks?
Any quick suggestions will be more helpful?
Thanks,
Hey @Jakeer ,
You can use Jira Automation if you'd like to achieve this with minimum effort.
If the JSM project is on the same site, then you can use the "Create Issue" Action and pass the trigger issues data via the action.
If it's in a different site, then Jira API should be the approach I'd take. You can use the create Issue API and pass all the info in the body from the original issues content.
There are some free plugins available in the market place too that let you achieve issues creation without having to pay extra for it.
Do let us know if this helps, if I may have misunderstood the requirements please feel free to reply back to this thread.
If this thread helps please mark this as Accepted for more visibility to the other community members
Thanks for the answer.
Can you please provide me the Automation rule for both same site and different. Even I have tried through automation rule getting errors.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jehan Bhathena
"If it's in a different site, then Jira API should be the approach I'd take. You can use the create Issue API and pass all the info in the body from the original issues content".
Can you please provide me the automation for the above one.
Quick reply will be more helpful.
Thanks in advance,
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.
Thanks for the Automation rule.
When I tried the same way, I am getting below errors. Which format do we specify a key, I have tried adding {{issue.key}} at the end of the URL Was still getting 404 Error.
Please help me on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Jakeer ,
I tested this at my end and it seems that you will have to use the "Custom Data" instead.
To get the data required to pass in the custom data you can use this API : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-createmeta-get. Eg. https://<sitename>atlassian.net/rest/api/3/issue/createmeta?projectKeys=<projectKey>&expand=projects.issuetypes.fields .
The output from the above API can be used identify the fields and parameters needed for issue creation, you can then pass the formatted values in the Custom Data.
Adding a simple JSON that works for my CREATE issues screen where I have no Mandatory field:
{
"fields": {
"summary": "Testing 123 - Push to Jira",
"reporter": {
"id": "<reporterUID>"
},
"project": {
"id": "10000"
},
"issuetype": {
"id": "10000"
},
"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Testing dummy input"
}
]
}
]
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried the same way you mentioned, but unfortunately, I am getting the errors.
Attaching the Automation Rule screenshot.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jakeer ,
The createmeta API call that you're using seems to have some issue.
I will recommend the below algo for the automation that you're creating:
Adding the body of the webrequest:
{
"fields": {
"summary": "Testing 123 - Push to Jira",
"reporter": {
"id": "{{issue.reporter.accountId}}"
},
"project": {
"id": "{{issue.project.id}}"
},
"issuetype": {
"id": "{{issue.issueType.id}}"
},
"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "{{#jsonEncode}}{{issue.description}}{{/}}{{issue.description.jsonEncode}}"
}
]
}
]
}
}
}
To verify if the webRequest works you need to use the below validator:
I would recommend you go thru the smart values documentation here to get a better grasp on the Automation and what it can provide. https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/
I cannot share a export of the automation at my end since it has content that can identify my site's UUID.
Jira also offers a great set of templates https://www.atlassian.com/software/jira/automation-template-library, you can use these to practice the automations too.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai @Jehan Bhathena
Thank you so much for your help.
But unfortunately, I am getting error although I followed all the steps you have provided to me.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Jakeer ,
The user whose token you've used here doesn't seem to have Create Issue permissions. Can you verify if that can be changed and then retry?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI, Both the instances belong to me, and I am having all the access and Create Issue Permission in both the instances.
Attaching you the permission level screenshot with you
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Jakeer ,
The POST request needs a Auth token, this token (to which ever user it belong) doesn't have access to create an issue. If you created a token previously I'd suggest creating a new one and retrying.
The above error is for permissions and more details can be found here: https://community.atlassian.com/t5/Jira-questions/quot-errorMessages-quot-quot-You-do-not-have-permission-to/qaq-p/2007900
PS: Google search the error and you'll come across the same solution of checking the permissions.
Would recommend you check this on some tool like POSTMAN or curl to verify everything works and then move towards Jira Automation since it's easier to debug on API tools. :-)
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.