when an incident is resolved by fixed by change . Change number is not showing up in fixed by change field.

prash4
Tera Expert

when an incident is resolved by fixed by change . Change number is not showing up in fixed by change field. 

 

find_real_file.png

16 REPLIES 16

Mohith Devatte
Tera Sage
Tera Sage

Hello ,

you are saying there are no records when you click on fixed by change or you cant see the number ?

can you send a screenshot what is happening after clicking on it ?

Hi @Mohith Devatte 

When an incident is resolved by fixed by change. and change request is closed incident gets resolved but  under related records tab fixed by change field changer number is not showing up. 

find_real_file.png

hello,

then i think there must be  business rule written on the incident or change request form with trigger conditions as state changed to resolved and populate the fixed by change field 

can you check this ?

if yes post the script it can be causing the issue

@Mohith Devatte 

BR script

 

(function executeRule(current, previous /*null when async*/ ) {
    gs.log('abc' + current.sys_id);
    var gr = new GlideRecord("incident");
    gr.addQuery("rfc", current.sys_id);
    //gr.addQuery("state", 4); // incident state 4 is pending change
    gr.query();
    while (gr.next()) {
        gs.log('abc 123' + gr.number);
        // resolve the incident
        gr.state = 6; // OOB, resolved is 6
        // add some canned comments to the resolved incident
        //gr.description = "This incident has been resolved due to the successful implementation of change request " + current.number;
       // gr.rfc = current.short_description;
        gr.update();
    }

})(current, previous);