Add patch label to multiple schedules
I can't seem to find a way to do this. I have created a patch label to patch a certain application on our workstations. We have about 40 schedules that patch different departments (sorted via label on computer name) around the organisation. Is there a way to add this new patch label to all the schedules without opening each schedule and adding it top the detect and deploy settings?
Thanks!
2 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
chucksteel
7 years ago
Service desk rules can actually write to any part of the database, so they can be very powerful (which of course means they can also be damaging if you aren't careful). Rules have two main parts, a select statement and an update statement. The select statement needs to return at a minimum a column named ID. The results of this column will be placed into a variable <TICKET_IDS> for use in the update statement.
So, in a case like this one, you could have a select statement that returns the ID for the patch schedules that need to be updated. The update query would then be an insert into the PATCHLINK_SCHEDULE_DEPLOY_LABEL_JT and the PATCHLINK_SCHEDULE_DETECT_LABEL_JT tables.
If you don't already have a tool like MySQL Workbench setup I highly recommend doing so. It is very useful for looking at the tables to figure out where things are in the database. - chucksteel 7 years ago