I am really stuck on trying to use a Python script to automate our approval process. I have focused on the script that Gopinath published, but cannot get it to evaluate values in Service Catalog questions, or fields with multiple values. There seem to be a lot of conversations around this topic, and is a critical need for us to automate. My challenge is that I am not a Python programmer, and don't know what data is available in the JSON file to have the scripts evaluate.
Hopefully I am just missing something, and can get this script working. If not, are there any options to get this behavior corrected in ServiceDesk? I want to avoid having to use another third party solution to just process ticket approvals.
Here is what our situation is:
What now currently happens is that a Help Desk person needs to manually create the approvals for the listed Data Stewards, and send them in stages. They need to manually copy the information into the approval notification, so the Data Steward can see what the approval request is for (they have problems clicking links and looking at the ticket details). It also needs to be done this way in case any Data Steward rejects an approval; we cannot have this impact all other Data Steward approvals.
-If we submit them all under one stage, then only one Data Steward can approve\reject. All other Data Stewards after that cannot.
-If we submit them in stages, then all Data Stewards can vote, but it is done serially, not in parallel. This means that the Data Stewards in Stages 2,3,4,5 won't receive notification until the first Data Steward votes.
I am really hoping that this can be changed in the product soon, because it is a severe hindrance to an otherwise great feature.
My strategy to work around this, was to use python scripts in this article:
I set it up, and created a sample field with approval codes in the form. That works very well, but here is the brick wall for me:
Since the form itself is not 'application specific', I need the script to be able to evaluate multiple values of the resource question (This is where the requester is selecting which applications they need). If python cannot check the values in a multi-value resource question in the Service Catalog, then option 2 would be to have python check for values within the description that match "Data Steward: Dave Barrante", then create stages of approvals based on the unique Data Stewards. A Data Steward may be listed multiple times, but only need to have one approval for that ticket from each Data Steward. To assist with another limitation of not being able to script the application details into the outbound approval message, I have the approval notification message send the entire contents of the description to the Data Steward.
I wanted to just show what we are trying to do, and determine if it is possible through scripting. In short, here is the ask: