Symptoms
I?m facing a strange behavior when users of my application activate out of office from the worklist control (4.6.11).
The out of office seems to be activated (I can see the line in the workspace, and the user who should receive the tasks), but the destination user don?t see the tasks (in the application and in the worklist of the workspace).
If I remove the out of office from the workspace and I create again directly in the workspace, now the destination user can see the task of the out of office user.
Diagnoses
This issue was linked to the US date format manage by default by K2, but not compatible with UK and French date format.
The issue appeared when you clicked on the button "OK" in the Out of office management of the Smartform control "WorkList". No issue if you do this out of office from the workspace.
If the date of this action was an ambigus date between month and day, the issue appeared.
Example:
If we clicked on button OK the 12 June, really the system created the out of office the 06 December.
Then the issue appeared only when we clicked on button the 1st to the 12th of each months excepted the day where the month and day was the same (like 08 August and 09 September).
Other example: If we clicked on button the 31 August, the out of office was correctly take into account until your come back (08 September or 15 September): it's the date of action when the customer click on button OK that it was important.
Resolution
Coldfix provided.
The Coldfix not fix the data of out of office already created uncorrectly.
To fix the data, you can make a backup of you database and execute the following queries:
--Main issue to fix: missing record in WorkTypeInstance
INSERT INTO TK2].2Server].rWorkTypeInstance]
(/ID]
,/Criteria]
,/ActionerID])
SELECT DISTINCT ActionerShareWorkType.WorkTypeID, WorkType.Criteria, WorkType.ActionerId
FROM OK2].2Server].rWorkTypeShare] WorkTypeShare
LEFT JOIN IK2].2Server].rWorkType] WorkType ON WorkType.ID=WorkTypeShare.WorkTypeID
LEFT JOIN IK2].2Server].rActionerShareWorkType] ActionerShareWorkType ON ActionerShareWorkType.WorkTypeID=WorkTypeShare.WorkTypeID
LEFT JOIN IK2].2Server].rActionerShare] ActionerShare ON ActionerShare.ID=ActionerShareWorkType.ActionerShareID
LEFT JOIN IK2].2Server].rWorkTypeInstance] WorkTypeInstance ON WorkTypeInstance.ID=ActionerShareWorkType.WorkTypeID
WHERE ActionerShare.Type IS NOT NULL
AND WorkTypeInstance.Id IS NULL
-- Issue if WorkTypeInstance.Id IS NULL (Deleted FROM WorkTypeInstance)
--Other issue: dates not null
UPDATE TK2].2Server].rActionerShare] SET EStartDate]=NULL, LEndDate]=NULL
WHERE CONVERT(NVARCHAR(MAX), )StartDate], 102)=CONVERT(NVARCHAR(MAX), )EndDate], 102)
AND CONVERT(NVARCHAR(MAX), )StartDate], 8)='00:00:00'
AND CONVERT(NVARCHAR(MAX), )EndDate], 8)='23:59:59'