Issue
When we use option transfer case in HR cases, the record is actually getting transferred but the number field remains same. Steps are as in below,
Steps to Reproduce:
- Impersonate as any HR user.
- Go to All HR Cases and try to create one.
- Upon the case creation click on "Transfer case".
- We can see a dialog box that renders the type of transfer.
- Choose the "transfer case with new number", we can see the new case number is created with the same old case number but with a different sys_id.
Release
Any Instance where HR application is installed
Cause
Custom Business rule has set the Number again to the transferred case number which has the following code,
current.number = current.transferred_from.number;
Resolution
Consider checking all the artifacts available related to the Transfer case Functionality to be OOTB,
- StandardCaseTransfer - Script Include.
https://<instance>.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=428f23fa3b4c33003585802b13efc484 - hr_TransferCase - Script Include,
https://<instance>.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=32678a3453b72300ff25ddeeff7b1213 - HR Transfer case configurations, check whether they are OOTB
https://<instance>.service-now.com/sn_hr_core_transfer_case_config_list.do?sysparm_query=&sysparm_view= - hr_TemplateUtils - Script Include.
https://<instance>.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=d9f16db02f321200b3c9a310c18c959e - Transfer Case, UI action
https://<instance>.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=c83e5ca42f131200b3c9a310c18c959d - Check the "Task" field dictionary setting and found to be similar to OOTB,
https://<instance>.service-now.com/nav_to.do?uri=sys_dictionary.do?sys_id=4aa902710f11310001024ebce1050e30%26sysparm_view=advanced - Check all the before Insert Business rules running on sn_hr_core_case table and check if there are any custom code which is setting the number back to the same number.
- Deactivate the custom code that sets the HR case number.