Hi All
I created an automate that is trigged when a issue is being deleted.
My aim is to block the deletion or at least send an email with the reporter name and issuekey when the ticket contains a label "obj_test"
I chose the option :
(x) Execute this rule immediately when the rule is triggered, instead of in the background
I thought that it will be possible to check if the ticket has a specific label , and send an email with the key and the reporter and so on....
But, it's not the case as my automate failed saying that the issueKey doesn't exist !
This occurs in the JQL that check if the issue contains a specific label
This step is an "If Issue matches JQL, included" created a Branch Rule ("For Current issue")
To debug it I sent an email first, and then, I put the branch rule and send again an other email. The first email is working properly but the error occurs after.
Could you help me to understand my issue?
Many thanks in advance,
Best regards
Agnes
An automation rule triggers after an event has occurred, such as Issue Deleted, and thus:
When I tested with issue delete and a Jira Cloud rule, the reporter and label were still available while the rule was executing. This may be different for Jira Data Center.
Seeing the specifics of your rule and audit log may explain what you are observing.
Kind regards,
Bill
Hi Agnes,
Can you please share the actual rule? It's hard to follow with just the text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @John and @Bill Sheboy
Here are the different steps of my workflow :
First step : Issue Deleted
2nd step : Email => OK
3rd step : If => KO
Here I got the error :
Please note that I got the same issue by moving the "If step" before sending the email
It seems that the key is available in the "email step" but not in the "check label step"....
If the quality of the pictures is not KO, tell me , I can capture other ones
Thanks in advance for your precious help
Agnes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wonder if some conditions (such as JQL condition) do not work on deleted issues because they actually run against the database's issue data rather than the issue data in the rule.
Please try removing the branch on current issue, and then testing the trigger issue smart values directly using the advanced compare condition rather than using the JQL condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suspect Bill is correct.
Also, another note - just don't let people delete stuff on that project.
And if you have to, just get an email every time it happens so you can assess the extend in quick issues are getting deleted because deleting issues is not a good practice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Sorry for the delay. Here my answer. I added a If "Advanced Compare Condition"
Not sure of my script. This is the first time I use smart value.
Is it correct ? I saw sometimes samples with an "#" before issue.labels
I received the first email but the next one. And I have no issue in the audit log...
In my first mail I can get the information on the ticket (*) included the labels !
Thx in advance
Best regards
Agnes
"
(*) 1st email, I got this result
Objet : Deletion
Hello ,
XXXX-11233 // TEST - 2 // obj_test
Our admin team doesn't want to change the commun roles created on the projet. And I can't get the rights I need without the deletion right...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that will work.
You could also try using the Issue Fields Condition as that will be simpler. I tried both with Jira Cloud and they worked, so it is likely the same for Data Center.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Two thing - Your example above has text in the email create that does not appear in the sample you provided, so I am assuming you modified it before the test (or afterward).
Second, your admin team should not let anybody be deleting issues except maybe Jira Admins at best. That's my opinion but something important is going to get deleted some day, and it should be on their heads if they let it happen.
Oh, third thing - Glad you got it working!! And thanks, @Bill Sheboy !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.