How to revert to new a change request that is in 'authorize' state

Carol2
Tera Contributor

Hi, 

Using the 'Revert to new' ui action how do i move the change back to new when its state is authorize?

what do i add to the script 

find_real_file.png

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Is the current code not reverting it? Are you saying this UI action should be visible only when State is Authorize?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

The current code is not reverting it and yes it should be visible only when the state is 'Authorize'

 

Regards

Carol Banda 

 

 

Hi,

For visibility you need to add check in UI action condition

current.state == 'Authorize'

Can you check if that script include has that function?

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

this is whats in the condition i think its out of box: 

 

current.state.canWrite()  && ((current.type == ChangeRequest.EMERGENCY && new ChangeRequest(current).isAuthorize()) || (current.type == ChangeRequest.NORMAL && new ChangeRequest(current).isAssess()))