Unable to update Install status on cmdb_ci_pc_hardware table

venugopal s
Tera Contributor

Hi Everyone,
I am unable to update when source changes to test, then I need to update install status to Install. I have written Business on Hardware table.

conditions : Source changes to Test
                   After Insert/update
Script:

function executeRule(current, previous /*null when async*/ ) {
    if (current.discovery_source == "test") {
        current.operational_status = '1';
        current.hardware_status = 'installed';
        current.install_status = '1';
       // current.update();
    }
venugopals_0-1715188025501.png

 

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@venugopal s Can you verify if the status fields you are setting are the right status values on operational_status, hardware_status and install_status? as according to the error message values in one of these fields is not correct which is causing the error. Please refer to the KB article in the error message to get to know more about the error.