When User Creates any kind of Change on problem form then it should be shown in related lis

Atik
Tera Contributor

Hi All,

I am working on Problem Management,

I have a requirement,

1. When the User creates any kind of change by Right Click > Create Change (Normal, Standard, Emergency)

(Basically using the UI Actions)

on the problem form then it should be shown in the related list of that problem.

2. Secondly we have to restrict the user go ahead in the Fix in Progress state of the Problem form if the Change Requested attached to the problem table has not been closed.

I have added the screenshots as well to get a clear picture of this.

 

Thanks In advance

 
 
 

 

1 ACCEPTED SOLUTION

Eswar Chappa
Mega Sage
Mega Sage

Hi @Atik for the first query Can you please update your UI action code to capture the Problem sys_id for the parent value on change request  and For the second one Can you Please write a Before Business rule on Problem table for Update operation and in Filter state changes to Fix in progress and Change is not empty, In the script 

write as below 

 

var cr = new GlideRecord('change_request');
    var sys = current.sys_id;
    //cr.addQuery('parent',current.sys_id);
    cr.addEncodedQuery('parent=sys^state=3');
    cr.query();

    if (!cr.next()) {
        current.setAbortAction(true);
		gs.addErrorMessage('Put your error msg');
    }

 

 

View solution in original post

2 REPLIES 2

Eswar Chappa
Mega Sage
Mega Sage

Hi @Atik for the first query Can you please update your UI action code to capture the Problem sys_id for the parent value on change request  and For the second one Can you Please write a Before Business rule on Problem table for Update operation and in Filter state changes to Fix in progress and Change is not empty, In the script 

write as below 

 

var cr = new GlideRecord('change_request');
    var sys = current.sys_id;
    //cr.addQuery('parent',current.sys_id);
    cr.addEncodedQuery('parent=sys^state=3');
    cr.query();

    if (!cr.next()) {
        current.setAbortAction(true);
		gs.addErrorMessage('Put your error msg');
    }

 

 

Aman Kumar S
Kilo Patron

Hi @Atik ,

When a Change request is created from problem, Parent field is not being set in the Change request, which should be the problem ticket. Once the parent field is set it will show up in the related list.

So you will need to customize the UI action script and add one line:

 

changeRequest.setValue("parent", current.getUniqueValue());
 
 
Best Regards
Aman Kumar