Hello,
I have written a Groovy Listener that on IssueAssign event, I want to bypass an entry to the history and activity areas. The issue is specifically with the parent. I always have the parent assigned to a user that is a place holder. The subtasks are then the issues that are assigned and worked on. So, if you can accidentally assign the parent to yourself, I have have added to my groovy listener that on an assign or update, that the parent is always signed back to the placeholder assignee regardless. In the history though, it is showing assigned from the placeholder to me and then another entry that is me back to the placeholder. My question is can I somehow make that the whole event not happen in groovy script so I wouldn't see the history event?
public void issueAssigned(IssueEvent event){
MutableIssue parent = (MutableIssue) event.getIssue();
//is this a DQ issue?
if (parent.projectId == 10072){
//is the issue a parent issue?
if (parent.isSubTask() == false) {
parent.assignee = userManager.getUser("devqueue");
System.err.println("full name " + parent.getAssignee().getFullName());
parent.store();
}
try {
Map actionParams = EasyMap.build("issue", parent.getGenericValue(), "issueObject", parent, "remoteUser", componentManager.getJiraAuthenticationContext().getUser(), "dispatchEvent", Boolean.FALSE)
CoreFactory.getActionDispatcher().execute(ActionNames.ISSUE_UPDATE, actionParams);
}
catch (Exception e) {
System.err.println("exception in corefactory");
}