Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Database rule not working

Highlighted
dmann
Collector

Database rule not working

I keep getting email alert for a db rule whn it should not send at all. If the Not HDTicket filed is True, then send email. Or if the HDTicket field is true, then do not ssend email.


These fields are filed in in the email

WRKGRP to: Help Desk
WRKGRP From:Help Desk
HDTICKET: Yes
Service Call 18950
Created by FE
Configuration item is CONNECTIVITYWIRELESS.
Priority is Low.
Status is Waiting.

When service call is created
OR When service call is modified
where NOT (HDTicket (*) equals True)
AND Assignment;To person (*) is empty
AND NOT (Assignment;To workgroup (*) is empty) AND Assignment;Assignment Status (*) equals New Ticket Assignment Notification B3 (Send e-mail message) ,

This message has been generated automatically.
13 REPLIES
Ramaprasad N
Esteemed Contributor

Re: Database rule not working

Where is the problem Bill? Rule states what you state and you should get an email. Is it like you are getting it even when it is false?? Remember, you have selected in the rule, to send email whenever the service call is created or modified. If you want to notify only at creation, then change this condition. Otherwise, it will send an email whenever the service call is saved with some modification.

-Ram
Ruth Porter
Honored Contributor

Re: Database rule not working

Hi Bill,

the conditions in your rule mean that an email will be sent whenever any one modifies the HDticket boolean or assigns the ticket to either a person or a group at any point in the life of the call.

Is this what you want? Can you explain the cisrcumstances when the email should go out and then perhaps we can advise on what conditions you should use.

Hope this helps

Ruth
http://www.teamultra.net
dmann
Collector

Re: Database rule not working

Wow, Do I have it wrong then.

I want to send email only if the HDTicket is not set to true. If the flag is set to true, then i do not want it sent.
dmann
Collector

Re: Database rule not working

I thought the where clause would prevent the email if the HDTicket was set to True. FYI: I went the NOT instead of False, due to the fact that a few tickets did not get set at all.

Any advise? I do not want email sent if this flag is set to true.

When service call is created
OR When service call is modified
where NOT (HDTicket (*) equals True)
AND ...
Ruth Porter
Honored Contributor

Re: Database rule not working

hi Bill,

I think the issue is the asterisk you have by all the conditions. The asterisk menas you have the box "Evaluate this ...." box checked for the condition.

To define a rule that sends out an email when a certain field changes but when other fields have a specifc value already as a pre-condition, you should set up the triggering condition with the asterisk (ie the box checked) and the pre-condition with the box unchecked.

I am not sure from your postings which of the conditions is the trigger and which the precondition but I hope this explanation will shed some light.

Regards

Ruth
http://www.teamultra.net
dmann
Collector

Re: Database rule not working

OK. Let's see if i got this right:

The trigger condition would be that the HDticket must be "not true". And then and only then would the other parts to be evaulauted and they are the pre-conditions?


When service call is created
OR When service call is modified
where NOT (HDTicket (*) equals True)
AND Assignment;Assignment Status equals New
AND NOT (Assignment;To workgroup is empty)
AND Assignment;To person is empty
Ticket Assignment Notification B3 (Send e-mail message)
dmann
Collector

Re: Database rule not working

I think I got it.

When service call is created
OR When service call is modified
where NOT (HDTicket equals True)
AND Assignment;To person (*) is empty
AND NOT (Assignment;To workgroup (*) is empty) AND Assignment;Assignment Status (*) equals New Ticket Assignment Notification B3 (Send e-mail message)

Assignment person, workgroup and status status are the triggers. The pre-condition is HdTicket.

I should only get email, if and only if HDticket is not true. The rule will only trigger if the assignment condition change.
dmann
Collector

Re: Database rule not working

I still must be missing something, rule does not work. I get false positive either way. It looks like the HDticket field cannot be evaulated properly.

Frustrating!
George M. Meneg
Honored Contributor

Re: Database rule not working

Hello Bill

When service call is created
OR When service call is modified
where NOT (HDTicket equals True)
AND Assignment;To person (*) is empty
AND NOT (Assignment;To workgroup (*) is empty) AND Assignment;Assignment Status (*) equals New Ticket Assignment Notification B3 (Send e-mail message)

This rule will not work. You have enable "evaluate this rule when this fields change" in an AND clause. This will be always false.

Remove the "evaluate this rule when this field has been changed" from the fields and the rule will work.
menes fhtagn
dmann
Collector

Re: Database rule not working

I will turn off the * and get back to you. I do not mean to be dense. But...

The logic is that where clause "evaluate this rule" on more than one statement combined with an AND always returns false because:

Only one field at a time can change?
Only one field can be evaluated at a time, combining two field evaluations cannot happen simultaneously?

I know this is a logic concept. Any help would be appreciated.

dmann
Collector

Re: Database rule not working

I have made the suggested updates. The rule still does not work.

Here is a the data:

WRK to: Help Desk
WRK From:Help Desk
HDTICKET: True
Service Call 19253
Organization Help Desk
Created by TR
Configuration item is KEYBOARD.
Priority is Low.
Status is Closed.

When service call is created
OR When service call is modified
where NOT (HDTicket equals True)
AND Assignment;Assignment Status equals New AND NOT (Assignment;To workgroup is empty) AND Assignment;To person is empty Ticket Assignment Notification B3 (Send e-mail message)
Ruth Porter
Honored Contributor

Re: Database rule not working

Hi Bill,

you say your condition now reads:

"where NOT (HDTicket equals True)
AND Assignment;Assignment Status equals New AND NOT (Assignment;To workgroup is empty) AND Assignment;To person is empty "

I think what you want is:
"where NOT (HDTicket equals True)
AND NOT (Assignment;To workgroup* is empty)
AND Assignment;To person is empty"

This shows that only the check on the workgroup has the "Evaluate this rule .." box checked. this is because it is the trigger and the other 2 conditions are preconditions.

Hope this helps

ruth
http://www.teamultra.net
dmann
Collector

Re: Database rule not working

Thanks everyone for the help.

I just gave up on this rule. I decided to use the person entered organization. This worked. Here is the rule:

When service call is created
OR When service call is modified where
Assignment;To person (*) is empty
AND NOT (Assignment;To workgroup (*) is empty)
AND Assignment;Assignment Status (*) equals New
AND NOT (Entered by person;Organization equals Help Desk )
Ticket Assignment Notification (Send e-mail message) , Send to: [Assignment;To workgroup], Subject: New Service Call
//Add this to "OnDomLoad" event