Class IssueEvent
- All Implemented Interfaces:
IssueRelatedEvent,JiraEvent,SpanningOperationEvent
The IssueEvent object thrown as a result of an edit operation, may now return null from a
getChangeLog() call. This can occur when a user chooses to edit an issue but only leaves a comment and
makes no other changes to the issue.
Prior to 3.5.2 no event was fired in this case and this was identified as a bug (JRA-9415) and has since been fixed.
Check any calls to getChangeLog() for null.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey of event parameter holding the application's base URL.static final StringIn case of issue delete events, a param with this key will store list of this issue's change history as a list ofChangeHistoryItemobjects.static final StringIn case of issue delete events, a param with this key will store list of this issue's comments as a list ofCommentobjects.static final StringIn case of issue delete events, a param with this key may store the custom field values of the deleted issue.static final Stringstatic final StringIn case of issue delete events, a param with this key may store list of this issue's watchers as a list ofUserobjects.Fields inherited from class com.atlassian.jira.event.AbstractEvent
params, time -
Constructor Summary
ConstructorsConstructorDescriptionIssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId) Create a new IssueEvent with a given list of parameters.IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId, boolean sendMail) Create a new IssueEvent with a given list of parameters.IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId, boolean sendMail, boolean subtasksUpdated) IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId, boolean sendMail, boolean subtasksUpdated, SpanningOperation spanningOperation) Create a new IssueEvent with a given list of parameters.IssueEvent(Issue issue, Map params, ApplicationUser user, Long eventTypeId) Create a new IssueEvent with a given list of parameters.IssueEvent(Issue issue, Map params, ApplicationUser user, Long eventTypeId, boolean sendMail) Allows configuration of whether the mail notification should be sent -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(IssueEventVisitor<T> visitor) booleanNote: this will not compare the time stamps of two events - only everything else.org.ofbiz.core.entity.GenericValuegetIssue()Gets spanning operation that this event is part of.getUser()Returns the user who initiated this event.inthashCode()booleanIf true, indicates that this issue event can be ignored by listeners, and that some other issue event representing the same thing has been published.booleanbooleanvoidsetWorklog(Worklog worklog) toString()Methods inherited from class com.atlassian.jira.event.AbstractEvent
getParams, getTime
-
Field Details
-
SEND_MAIL
- See Also:
-
BASE_URL_PARAM_NAME
Key of event parameter holding the application's base URL. -
CUSTOM_FIELDS_PARAM_NAME
In case of issue delete events, a param with this key may store the custom field values of the deleted issue.
NOTE: this parameter is not guaranteed to exist so explicit check in the event parameters map must be performed by the clients. If not found, the custom field values may be retrieved by means of field manager from the issue object associated with the event.
-
WATCHERS_PARAM_NAME
In case of issue delete events, a param with this key may store list of this issue's watchers as a list of
Userobjects.NOTE: this parameter is not guaranteed to exist so explicit check in the event parameters map must be performed by the clients. If not found, the value may be retrieved via
IssueManager.getWatchers(com.atlassian.jira.issue.Issue). -
CHANGE_HISTORY_PARAM_NAME
In case of issue delete events, a param with this key will store list of this issue's change history as a list ofChangeHistoryItemobjects. -
COMMENTS_PARAM_NAME
In case of issue delete events, a param with this key will store list of this issue's comments as a list ofCommentobjects.
-
-
Constructor Details
-
IssueEvent
Create a new IssueEvent with a given list of parameters.- Parameters:
issue- the issue this event refers toparams- parameters that can be retrieved by the Listeneruser- the user who has initiated this eventeventTypeId- the type ID of this event
-
IssueEvent
public IssueEvent(Issue issue, Map params, ApplicationUser user, Long eventTypeId, boolean sendMail) Allows configuration of whether the mail notification should be sent- Parameters:
issue- the issue this event refers toparams- parameters that can be retrieved by the Listeneruser- the user who has initiated this eventeventTypeId- the type ID of this eventsendMail- configure whether mail notifications should be sent
-
IssueEvent
public IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId) Create a new IssueEvent with a given list of parameters.This event also has an attached changeGroup, comment and worklog (any of which may be null).
- Parameters:
issue- The issue this event refers touser- the user who has initiated this eventcomment- A comment for this eventworklog- A worklog for this eventchangeGroup- An attached changeGroup for this eventparams- Parameters that can be retrieved by the ListenereventTypeId- the type ID of this event
-
IssueEvent
public IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId, boolean sendMail) Create a new IssueEvent with a given list of parameters.This event also has an attached changeGroup, comment and worklog (any of which may be null).
- Parameters:
issue- the issue this event refers touser- the user who has initiated this eventcomment- comment for this eventworklog- A worklog for this eventchangeGroup- an attached changeGroup for this eventparams- parameters that can be retrieved by the ListenereventTypeId- the type ID of this eventsendMail- configure whether mail notifications should be sent
-
IssueEvent
-
IssueEvent
public IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId, boolean sendMail, boolean subtasksUpdated, @Nullable SpanningOperation spanningOperation) Create a new IssueEvent with a given list of parameters.This event also has an attached changeGroup, comment and worklog (any of which may be null).
- Parameters:
issue- the issue this event refers touser- the user who has initiated this eventcomment- comment for this eventworklog- A worklog for this eventchangeGroup- an attached changeGroup for this eventparams- parameters that can be retrieved by the ListenereventTypeId- the type ID of this eventsendMail- configure whether mail notifications should be sentsubtasksUpdated-spanningOperation- operation that this event is part of
-
-
Method Details
-
getIssue
- Specified by:
getIssuein interfaceIssueRelatedEvent
-
getProject
-
getUser
Returns the user who initiated this event.- Returns:
- the user who initiated this event.
-
getChangeLog
public org.ofbiz.core.entity.GenericValue getChangeLog() -
getComment
-
getWorklog
-
setWorklog
-
getEventTypeId
-
isSendMail
public boolean isSendMail() -
isSubtasksUpdated
public boolean isSubtasksUpdated() -
isRedundant
@Internal public boolean isRedundant()If true, indicates that this issue event can be ignored by listeners, and that some other issue event representing the same thing has been published.- Returns:
- a boolean indicating whether this event is redundant.
-
getSpanningOperation
Description copied from interface:SpanningOperationEventGets spanning operation that this event is part of.- Specified by:
getSpanningOperationin interfaceSpanningOperationEvent- Returns:
- spanning operation that this event is part of.
-
toString
-
equals
Note: this will not compare the time stamps of two events - only everything else.- Overrides:
equalsin classAbstractEvent
-
accept
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractEvent
-