Hi,
i have a rule that uses a JQL to find issues, then make changes to these found issues
this needs to be done in a branch obviously
but now i need to delete the trigger issue created, but only if the JQL where able to find any issue
i tried with a global variable but it seems due to async run ob branches the delete issue action outside of the branch is not succeeding
and i cannot use delete issue inside branch because this would delete the branch issue found itself right?
how to solve this, any ideas?
Hi @Blerim
Just to confirm...
...is this correct? If yes, see below.
---
You should be able to do this with Lookup Issues - for example...
---
A few notes on this rule...
---
Let us know what you think!
There's some assumptions I've made here though as we don't know what the full rule looks like.
If this isn't quite what you need, could you provide that information? I.E what the Trigger is, and what other Conditions/Actions/Branches are in the rule? A screenshot here might be very beneficial :)
Ste
Hi @Ste Wright ,
thank you for your suggestions and time
i read you example and i think it has the same flaw as my rule.
sadly i need advice how to run an action for the trigger issue in or after the branch because i really need it *after* the branch.
since jira executes branch actions async your example has the same flaw as my rule
let me explain, the jira mail handler is rather simple and in our situation we do have a lot of external email communication. those mails do not have the mail-id in the header when it reaches jira to let it automatically append to the corresponding issue.
the only other option apart from the mail-id in the header is relying on the mail subject, but since the external systems/customers do not know beforhand the jira issue-id or sometimes ignore this information we need to link our jira issues with a known value of the external ticket-id that is present in the mail subject of the external ticket system.
long story short, the whole consume part based on the mail subject works as expected in my rule, but it still leaves me with a new issue created in the queue that i dont need anymore after it has been consumed to the existing issue...
let me describe what my rule does
When: Issue created
Request Type equals Emailed request
For JQL cf[xxx] in ({{summary.split(" ")}}) //simplified
Then: Edit issue fields Attachment Copy Attachment from Trigger issue
And. Add comment to issue {{triggerissue.reporter.displayName}}
and now i dont know how to tell jira to delete the trigger issue, after it has done all the copy attachment and comment
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Blerim
The difference is my rule uses a Lookup Issues Action prior to the IF/ELSE / Branch - so it already found the related Issues before it starts actioning the wider rule.
I tested this rule before I posted it, and it works fine for me. Could you try testing it using your rule parameters?
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ste Wright thank you for your help and time, i did set this rule up and it seems it is working. attachments and comments are written to the trigger issue, and the original new issue is also deleted now. I tested this with a simple mail and with a mail with 5mb attachments. 👍
would you kindly explain why the information from the trigger rule are able to write to the branch rule even when delete issue action is executed before? Is jira here doing something like undocumented caching when doing *lookup issues* and *re-fetch issue data* before executing the branch?
because in the test with the 5mb attachment i see in the logs that it deleted the issue before writing the comment. the comment is copying data from the triggerissue and still it worked despite the issue has been deleted?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Blerim
I couldn't give you a technical answer on this - I don't work for Atlassian, I'm just another user like yourself!
It might be that the actions are happening in parallel? Or the Lookup action takes a note of the details?
Either way it seems to work :)
Ste
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.