Move a Change Through States and Approvals

Taimour Farooqi
Tera Contributor

I am looking to update a few change records from new to closed, moving through the approval process, they need to have the dates imported/set from a sheet. These were prior to us moving changes to SN, so we want to use the dates for the actual approval.

 

I got the state part working but anyone know how to insert the approval record and time using a background script?

6 REPLIES 6

jMarshal
Mega Sage
Mega Sage

The table is sys_approver (not intuitive IMO) and you want to ensure the "approval for record" is the CR in question (the sysID) -- so you'll want to make sure you import CRs first and then get the reference value of the CR that you're associating the approval with.

Also, there are other records created on tables that would be "affiliated" with these change_request & sys_approver records (like email notifications for instance) that will be "missing" when you insert the records this way, but for dates/names in terms of historical reporting, this should work great!

The issue is I have to import the changes manually, they aren't from SN. So I can create the change but also we want the approvals to be from the dates of the actual approval.  

 

Struggling to figure out how to achieve this. 

do you have info about the approvals in a separate repository than the changes - or are the approvals that you have with changes from the other (not SN) system tied-in with the change records themselves?

I know some ITSM systems have an "approval" field that is satisfied/populated as a *part* of the CR itself...where the change has a field/variable on it for the approval information like "change.approved" and "change.approved_by"....

....however, in SN, approvals are in a separate table altogether (sys_approver) - so you'll have to do multiple consecutive imports & transforms to do this.

What does the initial data look like?

These prior changes were being tracked in a sheet basically, with the name, CI and other info. I plan to just manually enter all that info but then want to show the approval as being from the specific person and on the specific date that the sheet marks down.