Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Brief description:

Unanet generates an exception when a timesheet is created and the system tries to add a holiday for a user without access to the Holiday pay code.

What’s covered in this document:

Table of Contents
maxLevel2

Runtime Exception

When a user creates a new timesheet for a week containing a holiday and gets an exception, it is because the user has an assignment for the Holiday project configured for holidays in Admin > Setup. An example of the exception is as follows:

Unanet Runtime Exception
There was a Unanet Runtime Exception while processing /unanet/action/people/time/add/save.

The system failed to find a valid default pay code for Holiday on 5/25/2020. Possible reasons may include:

  1. The pay codes available to this user, due to their Employee Type restrictions, do not overlap with the pay codes allowed on this project.
  2. The master pay code list does not include any active pay codes designated as "Include in Default List" and the project does not have any active pay codes allowed.
  3. The system has no active pay codes defined. Please contact your Unanet Administrator.

Exception caught in com.unanet.servlet.ActionServlet.

com.unanet.lang.UnanetRuntimeException:

The system failed to find a valid default pay code for Holiday on 5/25/2020. Possible reasons may include:

  1. The pay codes available to this user, due to their Employee Type restrictions, do not overlap with the pay codes allowed on this project.
  2. The master pay code list does not include any active pay codes designated as "Include in Default List" and the project does not have any active pay codes allowed.
  3. The system has no active pay codes defined. Please contact your Unanet Administrator.

at com.unanet.data.factory.TimesheetFactory.makeNewTimesheet(TimesheetFactory.java:1048)
at com.unanet.page.time.TimeAddAction.service(TimeAddAction.java:120)
at com.unanet.page.Action.service(Action.java:293)

Background

When Unanet is configured to automatically populate holidays on timesheets, it will put the holiday hours on timesheets for any user that has an assignment on the project associated with the holiday date. The best practice for creating Holiday projects is to limit the Holiday project to specific pay codes so that the hours on timesheets go to the proper accounts in Unanet. When employees are configured with an Employee Type on their Person Profile, the employee type must support the pay code(s) associated with the Holiday project in order for the system to be able to pre-populate the timesheet with the holiday hours.

The common causes for this error are:

  1. Non-Salaried people have indirect assignments to the Holiday project through self-assignment or through Organization assignment.
  2. New employee type created that does not include the pay code associated with the Holiday project.

Troubleshooting

Case 1: Employee Should Get The Holiday Automatically Populated

If an employee should get the holiday automatically but is not, the issue is usually due to the Employee Type not having the appropriate Holiday pay code.

  1. Review the Holiday setup for the holiday that is expected to appear on the timesheet.
    1. Navigate to Admin > Setup, and then look for the holiday in question. Note that you can have different projects for different holidays so check the holiday that falls into the same date range of the time period for the timesheet that is throwing the error.



  2. Review the Holiday project associated with the holiday for the configured pay codes.
    1. Navigate to the project that is referenced by the Holiday in question, and select Pay Codes in the left menu. This will tell you what pay code is required for the Holiday project.



  3. Review the Employee Type associated with the Person Profile to ensure that the pay codes for the Holiday project are available.
    1. Navigate to the Person Profile and note the Employee Type field.



    2. Navigate to Admin > Setup > People > Employee Types, and verify that the pay code for the holiday is selected and moved to the right-side box for the Employee Type.


Case 2: Employee Should NOT Get The Holiday Automatically Populated

  1. Review the Holiday setup for the holiday that is expected to appear on the timesheet.
    Different holidays may have different projects. Select the holiday that falls within the date range of the time period for the timesheet that is throwing the error.



  2. Review the Holiday project assignments.
    1. Navigate to the Holiday project and select People Assignments in the left menu, and select List. Select the List tab at the top. Check the direct assignments to make sure that the user does not have a direct assignment to the Holiday project in the date range of the time period for the timesheet that is throwing the error.



    2. Check the Self Assign flag.
      If a Holiday project has the Self Assign flag selected, then all users in the system can get assignments on the project. This implicitly allows the system to try to create holidays on timesheets for this project for all users in the system. Remove the Self Assign check for the Holiday project to prevent the system from attempting to create an assignment and holiday automatically.



    3. Check the Organization assignments.
      1. Navigate to the Person Profile for the user receiving the error and note the Person Organization. 



      2. Open the Holiday project, select People Assignments in the left menu, and select Organizations.
      3. Verify that the Person Organization for the user in question is not listed in the organization assignment for the Holiday project.