Hi,
In my company, we have developed a Custom listener for the Issue Assigned Event that, after performing some validations to the "new" Assignee, it maintains, "clear" or modify the Assignee for that Issue. This works perfectly when we directly change the Assignee or by"Edit" button.
However, if the Assignee is changed on a Transition (we have the Assignee field on a screen that is shown during a status transition), the script runs (we have some emails that are sent via script during the validations), however, the Assignee does not change.
The "way" we are using to change assignee is:
currentIssue.setAssignee(otherIssue.getAssignee());
currentIssue.store();
And the Post Function that we have in a transition are, for example, as follows:
- Set issue status to the linked status of the destination workflow step.
- Add a comment to an issue if one is entered during a transition.
- Update change history for an issue and store the issue in the database.
- Re-index an issue to keep indexes in sync with the database.
- Fire a Generic Event event that can be processed by the listeners.
We have already tried to put the listener code between the "steps" (Post Functions) of the Transition, as well as in a Generic Event type Event (on Script Listeners), but the Assignee does not change (all code goes well, just does not change the Assignee)
Best Regards.