Home > Forum > Known bugs > Used and available days in vacation chart stopped working

Used and available days in vacation chart stopped working

I've noticed after installing 2023.1.3.29 that vacation charts stopped working and investigated what is the problem. After some tests it seems that the values of used and avalilable days that were previously automatically calculated based on the items already in the workflow are the problem and probably an error occurs when the engine tries to calculate them. When I turn off the visibility of both fields and leave only the "from previous year" and "from current year" ones visible, tha chart works. It stops working as soon as I try to make "Used" visible.

The problem occurs only when there is a vacaton entry which has no dates specified.

In my case, I keep the holiday leave limits on the list of items and then the source retrieves them more or less like this:

select
COS_BpsID as USR_UserID,
cast({DCNCOL:94} as int) as USR_CurrentYear,
floor(sum({DCNCOL:95})) as USR_DaysAvailableLastYear,
floor(sum({DCNCOL:96})) as USR_DaysAvailableCurYear,
floor(sum({DCNCOL:97})) as USR_DaysUsed,
floor(sum({DCNCOL:98})) as USR_DaysAvailable
FROM WFElementDetails
join WFElements on WFD_ID = DET_WFDID
join CacheOrganizationStructure ON COS_AD_mail = {WFCONCOL_ID:374}
WHERE
DET_WFCONID = {WFCON:399}
and {DCNCOL:94} = DATEPART(yyyy,getdate())
GROUP BY COS_BpsID, {DCNCOL:94}

Do you also have such a data source defined?