Title: Adjustment of an adjustment timesheet does not post due to a NullPointer exception. This prevents the timesheet from posting.
Description:
Error messages similar to the following appear in the bg-niku.log file when the curve returns a NULL value. The result is that the timesheet doesn't get posted and a NullPointerException message is written to the log. The defect for this issue is CLRT-23415.
ERROR 2008-09-18 14:45:34,930 [Dispatch Thread-39 : bg@moosh05-755] xql2.xbl (none:none:none) ****POSTTIMESHEET: Couldn't post adjustmented timesheet-->adjustedTimesheetID=5000074; adjustedTimeEntryID=5000718; assignmentID=5000023
ERROR 2008-09-18 15:00:00,107 [Dispatch Thread-61 : bg@moosh05-755] niku.xql2 (none:none:none)
java.lang.NullPointerException
Solution:
The fix for CLRT-23415 is in Clarity 8.1.3 and Clarity 12.0.1
1.
Go into Clarity and populate a brand new timesheet with direct entries. The timesheet must not have any time entered against it.
2.
Choose a time entry that does not have any time entered against it.
3.
Move mouse over time entry note icon and observe the id in the browser's status bar. Note this id down. (i.e. 14944138)
Note: You will need to pick a new time entry off a timesheet each time, because we cannot use a timeentry that has time entered against it.
4.
Verify that the time entry we picked has no hours by looking at the practsum field of the time entry (practsum should = 0).
select * from prtimeentry where prid = 14944138
5.
Identify the time entries that you would like to change:
select te.prid
from prtimesheet ts, prtimeentry te, prtimeperiod tp
where te.prtimesheetid = ts.prid
and ts.prtimeperiodid = tp.prid
and ts.prstatus = 4
and ts.prisadjustment = 1
and te.practsum = 0
and tp.prisopen <> 0
6.
Using the following query, replace the nnnnnnnn below with the prid gathered from step 3.
update prtimeentry set practcurve = (select practcurve from prtimeentry where prid = nnnnnnnn) where prid in
(select te.prid
from prtimesheet ts, prtimeentry te, prtimeperiod tp
where te.prtimesheetid = ts.prid
and ts.prtimeperiodid = tp.prid
and ts.prstatus = 4
and ts.prisadjustment = 1
and te.practsum = 0
and tp.prisopen <> 0)
NJ