Move the state to resolve state when "Mark Duplicate" UI Action is selected

Black Coder
Tera Guru

Hi 

in problem form there is a UI action called "Mark duplicate". It is used to cancel the current ticket when there is already a similar kind of problem ticket. When we click that button the state is moved to "Closed" state. Here we got the requirement that when "Mark Duplicate" button is clicked the state should move to "Resolved" state not to "Closed" state. When we check the properties of problem management, there is no option to enable it.

How can we achieve this?

17 REPLIES 17

@Black Coder 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

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

@Black Coder 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

 

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

Hi @Ankur Bawiskar 

sorry, but your approach is wrong and doesn't fit for problems. I spent some hours to find the correct way. See my answer šŸ™‚

Kind regards
Maik

Maik Skoddow
Tera Patron
Tera Patron

Hi @Black Coder 

instead of what was already said here for the Problem table another state management concept is implemented: the so-called State Management (see https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/state-model/concept...)

The mapping of the allowed Problem transitions can be found at table sys_state_transition. Or append the following URL to you instance to get the filtered list of all Problem states: /nav_to.do?uri=%2Fsys_state_transition_list.do%3Fsysparm_nostack%3Dtrue%26sysparm_query%3Dstate_model%3Ddf73699a3b031300ad3cc9bb34efc42d%26sysparm_first_row%3D1%26sysparm_view%3D

So to allow additional state transitions from "Assess" and "Root Cause Analysis" to "Resolved" you have to extend the "Enter Conditions" for state "Resolved" by these two states:

find_real_file.png

 

Next step is customizing UI Script "ProblemModalUIHelpers" at line 171 to

state: g_scratchpad.STATE.RESOLVED,

 

After that you probably will not see any difference because, for reasons I can't explain, ServiceNow has decided to implement "ProblemModalUIHelpers" as UI Script and not as Script Include as usual. As UI Scripts are cached by the browser you have to force a reloading at all of your users by setting a system property. The complete backgrounds of that property and how to set that property can you read at the following article: https://community.servicenow.com/community?id=community_article&sys_id=0eb79438db0e93804fc2f4621f961...

After all these things are done you can send your marked as duplicate Problems to the "Resolved" state.

find_real_file.png

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Hi @Black Coder 

Did my reply answer your question?

If so, please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

If not, please tell me what you are still missing!

Many thanks and kind regards
Maik