I am trying to create a rule which does the following:
Check ticket type is: Password Reset
Summary does not contain: ABC
Description does not contain: ABC
and then provide an automatic response accordingly. I have a separate rule configured for tickets which DO contain ABC in the Summary or Description which leads them to a completely separate portal. I want to configure a different response to go off specifically for tickets which do not contain ABC in them, so they are led to the correct portal.
The issue I'm experiencing is that I only have the options to either run if at least 1 of those is true or if all of them are true. What I want is an "and/or" for the Summary and Description containing ABC in them. As it stands, if I select "all true" then both the Password Reset and also the ABC automatic responses with go off if ABC is found either only in the Summary or only in the Description, but also if the ticket type is Password Reset.
Is there any way to set up a rule to check for these in an and/or manner?
I hypothesize the answer is, "yes, that is possible", although the community needs more specifics about your rule to know where / how to do so.
Please post the following for more context:
Until we see those...
When using a Scheduled trigger with JQL, you could create a JQL expression to include both cases.
When using a different trigger, you could use separate if / else condition blocks to select the different AND versus OR scenarios. The "trick" is doing the AND case first and preventing the OR from running later. Depending upon what actions the rule takes, that may be possible by adding a Re-fetch Work Item Data action.
Again, see your rule specifics will help clarify next steps. Thanks!
Kind regards,
Bill
Hello, thank you for your response. An image of both rules have been attached. Essentially, when a user opens a ticket with either UKG in Summary OR the Description but not both, then both rules will trigger. When UKG is listed in both Summary and Description, then it is properly ignored. What I want is for the password reset as a whole to be completely ignored when UKG is either in the Summary and/or the Description, not just and, and then the UKG rule runs as normal. Another user suggested an if/else statement, but I am unsure how I would build this to function in the manner I am looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for those images, @Stephen Finegan
First thing: there is a known, racetrack timing defect with the Work Item Created trigger, whereby the rule can start running before all the data is stable. This can cause errors and unpredictable results occasionally. The mitigations for that defect are:
Back to your question, let's use a truth table to confirm the desired behaviors:
| Case | Summary contains UKG | Description contains UKG | What to do? |
| 0 | No | No | ??? |
| 1 | No | Yes | ??? |
| 2 | Yes | No | ??? |
| 3 | Yes | Yes | ??? |
Once you have that clarified, you can decide if multiple rules are needed, a single rule with if / else condition blocks, etc.
For example, when one does not care which field contains UKG and you are just checking the count-of-UKG-found, you could use a single conditional expression to get the count, followed by a single if / else block on that count value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Case 0 - Password Reset response
Case 1, 2, 3 - UKG response
For none of these do I want both to run. I have seen the if/else blocks, but I do not think I understand how they function properly. How could I configure this to run in such a way?
I also was unaware of that issue, so I will definitely keep this in mind going forward to help slow the system down correctly. Thanks for that information!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for clarifying the cases!
I believe you can do this with one rule, using a single if / else condition block:
Please note well where you put the UKG response part as it should be under the "Add Else" for the block.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for this idea, but unfortunately, I'm not sure this is going to work. The reason is because one of the triggers also needs to be that the ticket type is Reset Password otherwise, it'll be added to every ticket that is opened. Is it possible to nest an if/else block inside of an if statement? So...
If: Ticket type is Reset Password
....If: Description and Summary not UKG
....Then: Password Reset Response
....Else: UKG Response
But then, even further, I need the UKG response to run on ticket types that also are not exclusively Reset Password types.
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.
Yes, testing the type is a good idea to confirm it is a "Reset Password" one.
However, using two rules creates the need to test for all three other cases in one of the rules. This is why I suggested using one rule to test the single case (i.e., neither field contains UKG) and letting the Else handle the remainder.
Having one rule also reduces the risk of them getting out of sync during any rule updates in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. I will do some further testing with all of this in mind, and I'll reach out again if I get stuck finding an elegant solution for all of this. You've been most helpful!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you an If/Else condition in your automaton rule.
https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/#If-else-block
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am unsure how I would build an if/else block to function in the manner I am looking for. I responded to another user with more details, if that helps you to understand my situation a little better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
YOu can combine this in an if/else clause, on the if to have all conditions and and in else conditions or and you can add another else with other or clauses.
These is not condition setting in an if or else to do and/or, its all and or all or in a condition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, I don't think I fully understand. Does the rule not function from top to bottom, so if the first condition is met, won't it just run and then continue?
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.