If impact and priority is changed on incident form and CI is changed then impact changing?

sandeshraut198
Tera Contributor

Hi All,

 

If impact and priority is changed on incident form and form saved and if we change CI then saved Impact and urgency is changing can we stop that?

In CI form impact is 'none'.

Could any one suggest on this?

 

Thanks in Advance.

5 REPLIES 5

Harish KM
Kilo Patron
Kilo Patron

Hi @sandeshraut198 OOB it donot work like that, do you have any onchange script or BR that runs on when CI change?

Regards
Harish

There is one client script for this,

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }
    if (newValue != '') {

        var ci = g_form.getReference('cmdb_ci', callback);


        function callback(ci) {
            var impact_inc = g_form.getValue('impact');
            var impact_ci = ci.u_impact;

            if (impact_ci == '') {
                impact_ci = 3;
            }


            if (impact_ci == impact_inc) {

                g_form.showFieldMsg('impact', 'Note change in Impact value due to CI selection');
            }


        }



    }
}

Hi @sandeshraut198 your custom client script sets impact value based on the value it has in CI "u_impact " field so this works as intended i.e when you change a CI the impact value is set based on value stored in CI.

 

Now what you want to change?

Regards
Harish

If any service desk agent is creating or receiving any incident and they are changing impact and saved the form.

After saving incident form if they change CI according to that Impact is changing but they don't want to change in impact even if they change CI.