I would my listener on the sprintCreatedEvent to only be triggered on a certain project. Currently the script below creates a version in a project when there is a sprint created in every project.
{code}
{code}
I've had the same problem trying to update issue priority via a listener based on custom field values entered during transitioning issue. The symptoms are as follows:
* Changing the custom field values on edit issue or view issue screen does update priority correctly.
* Changing the custom field values on a transition issue screen does produce an issue history log for priority change but does not actually change the priority value.
Using the IssueIndexingService does not help. Also, switching between different issue events do not matter as the listener is triggered correctly.
What I found is that using IssueManager updateIssue method does the trick, the problem only occurs while trying to update the issue via Atlassian's advised way to update an issue - using IssueService and all the validations.
Are there any other ideas to solve the problem? Because I'm in the same spot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since we know that the issue created and Issue updated events are working here, I would suggest trying to edit the workflow itself. You can specifically change the post function that is associated with this transition.
If you edit that workflow, go to post functions, then edit the Fire a Generic Event, you can change this to a value such as Issue Updated.
You can then publish this workflow, at which point the use of that transition should then fire off the issue updated event, and in turn trigger your script.
Since the execution of this transition is expected to change the status of the issue, I can't really think of any side-effects for this kind of workflow change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for the suggestion - I tried to set the workflow transition to invoke an Issue Updated event instead, but get the same result. Priority is not updated.
Further investigation, has shown that the Listener IS fired. I can log output and I can even see that I can read values out of the custom fields. The only thing missing is that the Priority field is not updated.
(I'll update my original question with this information as well).
br
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.