Several HR tables are protected and do not allow administrators to create notifications that contain information from its tables. Symptoms include:
- Some events are not triggered although other events are triggered correctly (inconsistent behavior).
- Some notifications sent by the HR Notification application have the fields populated correctly but other notifications are missing data from fields on the HR tables (for example, emails sent by the Approval Request).
The tables that contain the restrictions are:
- HR Contact [sn_hr_core_contact]
- HR Task [sn_hr_core_task]
- HR Benefit [sn_hr_core_benefit]
- HR Beneficiary [sn_hr_core_beneficiary]
- HR Case [sn_hr_core_case]
- Direct Deposit [sn_hr_core_direct_deposit]
- Tuition Reimbursement [sn_hr_core_tuition_reimbursement]
Steps to Reproduce
Enable Human Resources Scoped App v2 plugin.
Create an HR Case (sn_hr_core_case).
For more information, see the product documentation topic HR case management.
Create a task for this case.
Move task to Closed Complete.
Note in the event logs that the event sn_hr_core_task.closed is not present. Instead, the logs show that the HR task event sn_hr_core_task.allClosed has been triggered but it does not trigger the notification HR All Tasks Closed either.
Of the several business rules on the query named Restrict query, identify the one involved with your notification/event. Change the condition on the business rule to ignore the "system" user.
For example, on the business rule "Restrict query" on sn_hr_core_case, set the condition as follows:
gs.getUser().getName() != 'system' && gs.getUser().getRoles().indexOf(hr.ROLE_HR_CASE_READER) == -1
Related Problem: PRB1117288