You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Is it possible in the REST API to trigger an event?
I need to raise event "Issue Updated" via REST API without any changes.
I'm working with plugin "Big Picture", and after adding issue link - Big picture do not capture this change. But if I do something after with this task (change description, or something else) - event has been raised, and big picture creates issue link in Gannt diagram.
Hello @Roman Yashchenko ,
Welcome to the Atlassian Community!
Currently there is no way to trigger an event via REST API and, anyway, doing this might have undesired side-effects since an issue updated event may trigger email notifications and/or other actions in your Jira instance.
However, reading what you are trying to achieve, I would say this is something you should bring to the attention of the app vendor since:
Please get in touch with the app vendor by using the resources listed in the support tab of the marketplace page for BigPicture:
Contact
- Mon - Fri 7:00AM - 6:00PM CEST
- Email vendor
- Submit a support request
- Go to vendor status page
Also, as a temporary/dirty workaround for your issue, you can create a Jira automation rule (global or project specific) that will actually update the issue (e.g. adding a label, or setting a field) every time an issue is linked.
For details on how to do so, please see: Automate your Jira Cloud processes and workflows
I hope this helps.
Cheers,
Dario
Please excuse me for the untimely response on this matter.
We verified the behavior internally and, according to our tests, the links appear in the Gantt chart immediately after creating a link in the Jira issue.
Would you be able to test and confirm if this is true for you as well?
Thank you in advance for letting me know!
Best regards,
Mateusz Sołowianiuk
SoftwarePlant Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello.
As you can see, when I create issuelink thru REST API , it doesn't create on BigPicture:
but it creates in issue links:
Only, when I change description to another value - raise event "issue updated", and after that link creates on big picture:
There is a VBA code:
Sub test001()
createLink "TESTINVEST-8926", "TESTINVEST-8927"
End Sub
Sub createLink(ByVal sourceKey As String, ByVal targetKey As String, Optional ByVal linkType As String = "Gantt End to Start")
jira.sendRequest "/rest/api/2/issue/" & sourceKey, "PUT", "{""update"":{""issuelinks"":[{""add"":{""type"":{""name"":""" & linkType & """},""outwardIssue"":{""key"":""" & targetKey & """}}}]}}"
'therre is no link on big picture
descr = JsonConverter.ParseJson(jira.getIssues("key=" & sourceKey))("issues")(1)("fields")("description")
jira.updateIssue sourceKey & "", , "link added"
'there is link creates on big picture
jira.updateIssue sourceKey & "", , descr & ""
End Sub
Function sendRequest(address As String, Optional method As String = "GET", Optional requestText As String = "")
TargetURL = getProperty("jira.protocol") & "://" & getProperty("jira.address") & ":" & getProperty("jira.port") & address
Set HTTPReq = CreateObject("WinHttp.WinHttpRequest.5.1")
myuser = getProperty("jirausername")
mypass = getProperty("jirapassword")
sAuth = main.TextBase64Encode(myuser & ":" & mypass, "us-ascii")
HTTPReq.Open method, TargetURL, False
HTTPReq.setRequestHeader "Content-Type", "application/json"
HTTPReq.setRequestHeader "Authorization", "Basic " & sAuth
HTTPReq.setRequestHeader "x-experience-api-version", "1.0.0"
HTTPReq.send (requestText)
sendRequest = HTTPReq.responseText
End Function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello.
As you can see, when I create issuelink thru REST API , it doesn't create on BigPicture:
but it creates in issue links:
Only, when I change description to another value - raise event "issue updated", and after that link creates on big picture:
There is a VBA code:
Sub test001()
createLink "TESTINVEST-8926", "TESTINVEST-8927"
End Sub
Sub createLink(ByVal sourceKey As String, ByVal targetKey As String, Optional ByVal linkType As String = "Gantt End to Start")
jira.sendRequest "/rest/api/2/issue/" & sourceKey, "PUT", "{""update"":{""issuelinks"":[{""add"":{""type"":{""name"":""" & linkType & """},""outwardIssue"":{""key"":""" & targetKey & """}}}]}}"
'therre is no link on big picture
descr = JsonConverter.ParseJson(jira.getIssues("key=" & sourceKey))("issues")(1)("fields")("description")
jira.updateIssue sourceKey & "", , "link added"
'there is link creates on big picture
jira.updateIssue sourceKey & "", , descr & ""
End Sub
Function sendRequest(address As String, Optional method As String = "GET", Optional requestText As String = "")
TargetURL = getProperty("jira.protocol") & "://" & getProperty("jira.address") & ":" & getProperty("jira.port") & address
Set HTTPReq = CreateObject("WinHttp.WinHttpRequest.5.1")
myuser = getProperty("jirausername")
mypass = getProperty("jirapassword")
sAuth = main.TextBase64Encode(myuser & ":" & mypass, "us-ascii")
HTTPReq.Open method, TargetURL, False
HTTPReq.setRequestHeader "Content-Type", "application/json"
HTTPReq.setRequestHeader "Authorization", "Basic " & sAuth
HTTPReq.setRequestHeader "x-experience-api-version", "1.0.0"
HTTPReq.send (requestText)
sendRequest = HTTPReq.responseText
End Function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for providing this - I understood you incorrectly and was verifying a different scenario. I am verifying this with our developers again for full confirmation. I will post it in this thread once I have more details.
Best regards,
Mateusz Sołowianiuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your patience regarding this.
Please be informed that our developers managed to create a link in Jira using the POST HTTP method. The link appeared in the Gantt chart instantly after refreshing the page. This is the code that was used:
POST https://INSTANCE-NAME.atlassian.net/rest/api/2/issueLinkContent-Type: application/json Authorization: Basic bWFyY2luLmtpdGFAc29mdHdhcmVwbGFudC5j******** { "outwardIssue": { "key": "SCRUM-1" }, "inwardIssue": { "key": "SCRUM-2" }, "type": { "name": "Gantt End to Start" } }
Also, our developer found that your code does not meet some of the requirements listed in the documentation. The key differences are:
Please verify if such a command will work for you.
Last but not least, I suggest that, in case of further questions, this discussion is moved to our Service Desk as it will facilitate including the developers in the discussion in a huge extent.
I hope that this helps, though :)
Best regards,
Mateusz Sołowianiuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.