All, I have tried this several different ways, but it seems impossible, and I am having trouble understanding why. What I want is for new issues being automatically created based on emails to go through a couple of different scripted processing functions. For a simple example:
- Email comes in and new issue created
- On the create transition see if the issue matches a couple things.
- If No, just leave it.
- If yes, fast-track the issue to transitionB.
- In transitionB, do the following:
- clone the issue to a new project as a issuetypeZ.
- delete the original issue
What I have tried so far is putting all of the above into post functions in transitions. This does not work. When I try to create an issue while 3b is implemented, if I manually create an issue which will match 2b, then I get this error message: "We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file." If I remove that one step, then everything else works fine. The issue I created will:
- End up in the status that follows transitionB.
- Will create a clone of itself in the new project as intended.
- Include a link to the cloned issue.
I have also tried taking 3b out, and making it an event listener. Instead what I do in step 3 above is modify the issue summary to include a flag to denote the issue needs to be removed. My reason for moving this to a listener was a guess that I could not a delete a thing as it was being created (which I am still not doing really, but whatever . . .). If I put it in a listener then I am saying okay, wait till this thing is created, transitioned, and the new issue cloned from it. THEN, listen for the last issue updated event, and then do the delete. Like this would be a completely separate, stand-alone task. However, I get the same message as above no matter what.
It seems that there is no way to automatically delete issues at least not when the chain of events leading to that starts from a series of automated actions initiated during the Create transition. Can anyone shed some light on this?