Forums

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

Getting the current event

Pradeep A
Contributor
July 14, 2021

Hi is there any way to get the information of the current event. Like I would Like to know what kind of event is happening. Ex: Issue created, Issue commented etc.

I would like to access this information so that I could send a custom message to a third party app

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2021

Where?

I mean, where are you wanting to "get" the event?  

I can probably answer this without knowing though.  Events are intended to be a stream of notifications that things are happening in Jira.  They're announcements for things to read if they want.

The way to read the list is with "listeners" - they (selectively) read the events and run code to do what they are intended to do. 

In the code for a Scriptrunner listener, you literally have the event in the context, so you can use it directly without any need to do any selection or reading.  For example:

def issueEventHappenedTo = event.issue

Pradeep A
Contributor
July 14, 2021

I know about this "def issueEventHappenedTo = event.issue" but what i'm trying here is to send what event is happening as a message to a third party app. Lets's say some one is commenting on the issue. I would like to send a message saying that the issue have been commented

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2021

Yes, you said that already, but you have clarified enough for me to be able to add to my answer.

The best/easiest way to do this would be with a listener.  Look to scripted listeners, as you'll be able to write code in one of them that pokes remote systems.  There's some examples over at https://library.adaptavist.com/search?term=listener

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events