Is it possible to cancel Service Type Events on Multiple Tickets?
Our customer requested a change on their Service Type, I understand that changes on Service Types will only take effect on new tickets that was created after the change is made but they want it to take effect on existing tickets before the change was made as well.
This can be done on one ticket by going to the Additional Information tab > Service Type, and cancel the Attached Service Type Events there.
How many tickets are you talking about? Sometimes it can be quicker to just manually do it, rather than look to scripting a solution.
There's no out-of-the-box way to do this, and you would need to look along the lines of this thread to do something similar, I'd guess: Delete and Cancel Spel Methods on atev Object
Around 600 at the moment.
Ok, thanks Ruben.
Sorry, I've got nothing more than the above - which I think is the right starting point, but needs some work to bang into shape.
The scenario is "unusual" because normally Service Type changes are not retrospective - the new contract would apply going forward.
Anyone else got some suggestions on mass update of the Service Type?
I cannot think of any thing else other than via the backend (SQL or pdm_load). It won't be any pretty, but could do the job. (Desperate times call for desperate measures...)
P.S. Make a back up the MDB before doing this
If you are able to provide a sdm wherclause, I would be able to provide a simple spel script which does this job.Regards....Michael
attached is a so called fragment file , a script which can be executed by the fragment interpreter bop_cmd
the script implements the function cancel_evt.
It has three input parameters:
the script prints the ticket number of each ticket found which has attached SLA events.
It also prints the current status of each event.
ticket numbers of tickets which don't have attached SLA events are collected and skipped, but printed at the end of the script.
As long this script is excuted with doit=0, nothing will be changed in the system, but you will get printout of what this script finds.
For example if you want to work on active incidents with with priority=3 you might execute
bop_cmd -f cancel_evt.frg "cancel_evt('cr','type=\'I\' and active=1 and priority.sym=\'3\'',0)"
The output should look similar to
found 'cr' '110 with 3 eventsatev.id=400452 group_name=SLA Status=Firedatev.id=400455 group_name=SLA Status=Firedatev.id=400456 group_name=SLA Status=Firedfound 'cr' '122 with 8 eventsatev.id=400654 group_name=SLA Status=Cancelledatev.id=400657 group_name=SLA Status=Cancelledatev.id=400658 group_name=SLA Status=Cancelledatev.id=400664 group_name=SLA Status=Firedatev.id=400665 group_name=SLA Status=Waitingatev.id=400666 group_name=SLA Status=Waitingatev.id=400667 group_name=SLA Status=Waitingatev.id=400668 group_name=SLA Status=WaitingSkipped Objects :28, 32, 35, 36, 38, 40, 42, 43, 44, 54, 55, 89, 92, 102, 103
when executing the same with doit=1
bop_cmd -f cancel_evt.frg "cancel_evt('cr','type=\'I\' and active=1 and priority.sym=\'3\'',1)"
The output looks like
found 'cr' '110 with 3 eventsatev.id=400452 group_name=SLA Status=Firedatev.id=400455 group_name=SLA Status=Firedatev.id=400456 group_name=SLA Status=Firedfound 'cr' '122 with 6 eventsatev.id=400654 group_name=SLA Status=Cancelledatev.id=400657 group_name=SLA Status=Cancelledatev.id=400658 group_name=SLA Status=Cancelledatev.id=400664 group_name=SLA Status=Firedatev.id=400667 group_name=SLA Status=Cancelledatev.id=400668 group_name=SLA Status=CancelledSkipped Objects :28, 32, 35, 36, 38, 40, 42, 43, 44, 54, 55, 89, 92, 102, 103
For sure , you should make a backup of your DB before setting doit=1 !
Hope this helps somehow. If stuff is missing or doesn't work as expected, let me know.
I'll test this one out on our Development. I appreciate your help.
Thank you very much!
This accomplished what our customer wanted.