@PublicApi public final class IssueEvent extends AbstractEvent implements IssueRelatedEvent
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.
Modifier and Type | Field and Description |
---|---|
static String |
BASE_URL_PARAM_NAME
Key of event parameter holding the application's base URL.
|
static String |
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 of
ChangeHistoryItem objects. |
static String |
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 of
Comment objects. |
static String |
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.
|
static String |
SEND_MAIL |
static String |
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
User objects. |
params, time
Constructor and Description |
---|
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.
|
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,
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
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(IssueEventVisitor<T> visitor) |
boolean |
equals(Object o)
Note: this will not compare the time stamps of two events - only everything else.
|
org.ofbiz.core.entity.GenericValue |
getChangeLog() |
Comment |
getComment() |
Long |
getEventTypeId() |
Issue |
getIssue() |
Project |
getProject() |
ApplicationUser |
getUser()
Returns the user who initiated this event.
|
Worklog |
getWorklog() |
int |
hashCode() |
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.
|
boolean |
isSendMail() |
boolean |
isSubtasksUpdated() |
void |
setWorklog(Worklog worklog) |
String |
toString() |
getParams, getTime
public static final String SEND_MAIL
public static final String BASE_URL_PARAM_NAME
public static final String 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.
public static final String 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
User
objects.
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)
.
public static final String CHANGE_HISTORY_PARAM_NAME
ChangeHistoryItem
objects.public IssueEvent(Issue issue, Map params, ApplicationUser user, Long eventTypeId)
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 eventpublic IssueEvent(Issue issue, Map params, ApplicationUser user, Long eventTypeId, boolean sendMail)
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 sentpublic IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId)
This event also has an attached changeGroup, comment and worklog (any of which may be null).
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 eventpublic IssueEvent(Issue issue, ApplicationUser user, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, Map params, Long eventTypeId, boolean sendMail)
This event also has an attached changeGroup, comment and worklog (any of which may be null).
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 sentpublic Issue getIssue()
getIssue
in interface IssueRelatedEvent
public Project getProject()
public ApplicationUser getUser()
public org.ofbiz.core.entity.GenericValue getChangeLog()
public Comment getComment()
public Worklog getWorklog()
public void setWorklog(Worklog worklog)
public Long getEventTypeId()
public boolean isSendMail()
public boolean isSubtasksUpdated()
@Internal public boolean isRedundant()
public boolean equals(Object o)
equals
in class AbstractEvent
public <T> T accept(IssueEventVisitor<T> visitor)
public int hashCode()
hashCode
in class AbstractEvent
Copyright © 2002-2017 Atlassian. All Rights Reserved.