Get EventId in listener under "Issue Create"

Normann P. Nielsen - TDC/Netic January 10, 2018

Why is this not working :-)

 

I need to capture - and fire listener if:

 

1. Issue created and field set to "ERP"

2. Issue changes and field set to "ERP"

 

Code:

 

import com.atlassian.jira.event.issue.IssueEvent;

long EventId=event.getEventTypeId;

boolean InChange = changeItems.any

{ it.field=='DIIT Team'}

'ERP' in cfValues['DIIT Team']*.value && ( InChange || EventId.toString() == "1" )

 

The "getEventTypeId" fails with: No such Property - https://docs.atlassian.com/software/jira/docs/api/7.0.0/com/atlassian/jira/event/issue/IssueEvent.html

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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.
January 10, 2018

Hello,

It is not a property, it is a method that is why you should call it like this

long EventId= event.getEventTypeId()

with parenthis

Normann P. Nielsen - TDC/Netic January 12, 2018

What a rookie mistanke - LOL

 

Thanx. mate - appriciated !!

 

BR,

 

Normann

Suggest an answer

Log in or Sign up to answer