Service Desk Practitioners Forum
cancel

Sheduler can not use just calculated datetime field. 4.5sp20.

Highlighted
Yuri_
Regular Contributor.

Sheduler can not use just calculated datetime field. 4.5sp20.

Hello.
I have 2 db rules with the same condition. the first sets a custom datetime field (X) a value. the second should shedule a data update in a moment, basing on the field X, but it does not.
PS:the order of execution corresponds to used above rules names. if first (before saving item) to set the field X any value - sheduler will use it. caused by upgrade sp9-sp20.sd 4.5.
6 REPLIES
Michel SILVA SO
Outstanding Contributor.

Re: Sheduler can not use just calculated datetime field. 4.5sp20.

Hello Yuri,
could you please send the db rules definitions.

Rgds,
Michel
Yuri_
Regular Contributor.

Re: Sheduler can not use just calculated datetime field. 4.5sp20.

of course.
datetime field - Solved.
Notice, that by the UI logic the field Status is set to Completed, when Assignment status equals ready, this is why given DB Rules evaluate in the same time

Rule 1. UPD_Solved.
a)When service call is created
When service call is created
OR When service call is modified
where NOT (Closure code is empty)
AND ( Status (*) equals Completed
OR ( Solved is empty
AND Status (*) equals Closed))
(Update Data) Solved set to (Current date)

Rule 2.MRInf_User_Ready(Caller)
When service call is created
OR When service call is modified
where Assignment;Assignment Status (*) equals Ready
AND Status equals Completed, Schedule the validation of this condition at 2 minutes After Solved
(Send e-mail message) , Send to: MAIL_ROBOT, Subject: $servicedesk2, Message:bla-bla-bla
Michel SILVA SO
Outstanding Contributor.

Re: Sheduler can not use just calculated datetime field. 4.5sp20.

Hi Bill,

I think the problem stays on the second db rule:

Rule 2.MRInf_User_Ready(Caller)
When service call is created
OR When service call is modified
where Assignment;Assignment Status (*) equals Ready
AND Status equals Completed, Schedule the validation of this condition at 2 minutes After Solved
(Send e-mail message) , Send to: MAIL_ROBOT, Subject: $servicedesk2, Message:bla-bla-bla

The db rule will only be triggered if Assignment;Assignment Status (*) has been changed. (*)means evaluate if changed. If the value does not change it will not be triggered.

Pls uncheck the evaluate if changed check box for Assignment;Assignment Status (*) equals Ready.

Hope this helps,
Rgds,
Michel
Michel SILVA SO
Outstanding Contributor.

Re: Sheduler can not use just calculated datetime field. 4.5sp20.

Sorry I mean Yuri not Bill
I'm answering on two request...

Rgds,
Michel
Robert S. Falko
Acclaimed Contributor.

Re: Sheduler can not use just calculated datetime field. 4.5sp20.

Yuri,

Display your db rules using the view that activates the up and down arrows at the top of the view.

Select rule 1, and make sure it appears physically in the list above rule 2. This should guarantee that rule 1 is executed first.

You can check the server log to see in what order the rules are executed, and what else might be going wrong.

-Josh
Yuri_
Regular Contributor.

Re: Sheduler can not use just calculated datetime field. 4.5sp20.

>Pls uncheck the evaluate if changed check box for Assignment;Assignment Status (*) equals Ready.
Michel, this helps, but comes into conflict with the logic I need.
The rule starts evaluating, but can not be sheduled using field Solved (X).

Josh,

>Display your db rules using the view that activates the up and down arrows at the top of the view.
the order if execution is correct.

>You can check the server log to see in what order the rules are executed, and what else might be going wrong.
1st Evaluate Rule: "RULE"

then checks all conditions - all are true:
Rule "RULE" condition: true
......
Rule "RULE" condition: true

finally, surprise: Rule "RULE": don't execute the actions.