Can not update from state 'In Review' to state 'Root Cause Analysis' with given values.

Rahul Raja Sami
Tera Guru

Hi 

I am trying to change the state from 'In Review' to 'RCA' on problem ticket form using an UI Action, but I am seeing this error "Invalid state transition.Can not update from state 'In Review' to state 'Root Cause Analysis' with given values." twice.

why?

1 ACCEPTED SOLUTION

Hi Michael
My issue is solved, just need to set the enter condition of RCA on the State Model.

View solution in original post

3 REPLIES 3

Michael Fry1
Kilo Patron

I don't see an In Review state baseline. Did you add one? if Yes, did you update the state model?

Hi Michael, yes I have updated the state model and process flow.
So the thing is In Review will be placed in between RCA and Fix in progress.

With the help of Review button the state will be changed to In Review.

function reviewButtonClick() {
  var currentState = g_form.getValue('state');

  if (currentState === '103') {
    g_form.setValue('state', '105'); // Set the state to "In Review"
    g_form.save(); // Submit the form

    // Disable auto-refresh
    g_form.setDisableUnloadConfirmation(true);
    
    // Show the progress message
    g_form.showProgressMessage('Changing state to In Review...');

    // Reload the form after a short delay
    setTimeout(function() {
      window.location.reload();
    }, 2000);
  } else {
    alert('Cannot change state to "In Review" from the current state.');
  }
}


but I want create a new button when the state is IN Review called Reassess, when click this the state needs to be changed to RCA.
but not working

var gr = new GlideRecord('problem');
gr.get(current.sys_id);
if (gr.state =='105'){
   gr.state = '103';
   gr.update();
   gs.addInfoMessage('Problem reassessed successfully.');
}
else{
	gs.addInfoMessage('not possible');
}

but not working and showing the above error mentioned.

 

Hi Michael
My issue is solved, just need to set the enter condition of RCA on the State Model.