Errors in HelpDesk with HDQUERY
I want to have a validation rule:
when worker set status Closed the rule checks if the ticket had status Realised in the past.
I made it by HDQUERY:
"HDQUERY[[select top(1) workitem_version from workitem_only_view where workitem_number = WORKITEM(workitem_number) and workitem_status_lookup_id = 400 and workitem_version <= PREVIOUSITEM(workitem_version) order by workitem_version]]" is greater than or equal to "1"
and also other condition that checks the new status - but it doesn't matter.
And it works fine for normal work.
But when worker want to edit multiple incidents I have in the logs:
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
Source: Altiris.AlertManager.SqlHelper.
and the next two:
Error in evaluation of validation rule 'Obowiązkowo status Zrobione' for Incident #13443. Line 3 of the criteria has these macro errors: The following complex macros failed: Error expanding HDQUERY[[...]] macro - sql lookup error (executing sql "select top(1) workitem_version from workitem_only_view where workitem_number = 13443 and workitem_status_lookup_id = 400 and workitem_version <= 15 order by workitem_version") - Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source: Altiris.Helpdesk.Services.WorkItemService.Commit
Error processing batch job #44713 - update Incident #13443: Altiris.Helpdesk.Services.WorkItemException: Incident 13443: Validation failure: Obowiązkowo status Zrobione - Zanim ustawisz status Zamknięte lub Zamknięte Technicznie zgłoszenie musi mieć wcześniej status Zrobione. at Altiris.Helpdesk.Services.WorkItemDataSet.Commit() at Altiris.Helpdesk.Services.BatchJobDataSet.ProcessJobQueues()
Source: Altiris.Helpdesk.Services (batch job)
My system is HelpDesk 6.0 SP5
Any ideas are welcome.
I made different queries like: "HDQUERY[[select count(*) from workitem_only_view where workitem_number = WORKITEM(workitem_number) and workitem_status_lookup_id = 400]]" is equal to "0" but always I had errors.
regards,
Hubert