Fill Risk Assessment Using ATF for Change forms

Midilesh
Tera Contributor

@Chris Doernbrack @Brian Lancaster 

Hi Brian, Chris

I am trying to Test Change forms using ATF where I was Struck at a point to Fill the Risk Assessment. So once a user fills that risk assessment and submits the Risk value is populated.

Approaches I Tried as of now:

1. Using the Custom UI  step in ATF.

2. Directly inserting the record into metric result on that particular Change Form.

Share me your thoughts, which will help me.

Regards,

Midilesh.

15 REPLIES 15

Brian Lancaster
Tera Sage

I wrote an article on how to do this. We are using the Out of the box assessment so there may be some changes you need to make.

https://community.servicenow.com/community?id=community_article&sys_id=d75f6c25db180114fd8d2b6913961...

Hi Brian

 

Can u help me by posting the steps I already followed the above approach but Risk assessment stays same. Reason is the questions we are using are different.

find_real_file.png

find_real_file.png

  1. You would need to modify the step configuration inputs to match your questions and there values.
  2. you would need to modify this section of code to match your new inputs.
    var bis_svc = inputs.u_ci_business_service;
    var complex = inputs.u_complexity_of_change;
    var dificult = inputs.u_difficult_to_revert;
    var redundancy = inputs.u_redundancy_plan;
    var verify = inputs.u_verification_change;​

     

  3. You would also need to modify this section of code to set the correct values base on the names of your questions.
     while (setResponse.next()) { //set assessment answers
                if (setResponse.metric.name == 'Complexity of change') {
                    setResponse.value = complex;
                } else if (setResponse.metric.name == 'Difficult to revert') {
                    setResponse.value = dificult;
                } else if (setResponse.metric.name == 'Verification of change') {
                    setResponse.value = verify;
                } else if (setResponse.metric.name == 'Affect critical CI or Business Service') {
                    setResponse.value = bis_svc;
                } else {
                    setResponse.value = redundancy;
                }
                setResponse.update();
            }​
     

 

Hi Brian,

 

Could you help me with setting the Input values because our questions doesn't have any backend values.

 

find_real_file.png