Effects of changing settings in 'Standard' calendar
search cancel

Effects of changing settings in 'Standard' calendar

book

Article ID: 380242

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

  • A day is marked as working day from a non-working day, in the 'Standard' calendar
  • There are other calendars in the system
  • It is then noticed via the following query that all the records in prj_resources table are set to slice_status = 1, 2 etc. , when the Time Slicing job executes, as against only those records connected to the 'Standard' calendar getting touched
  • Is this expected behaviour?
  • Query:

SELECT 'Allocation' Slice_Object, Count(*) cnt, SLICE_STATUS
FROM prteam
GROUP BY slice_status
UNION ALL
SELECT 'Availability' Slice_Object, Count(*) cnt, SLICE_STATUS
FROM prj_resources
GROUP BY slice_status

Resolution

Changes made to 'Standard' calendar results in reslicing of all resource records in prj_resources.

A sample query to check data that gets resliced in prj_blb_slices table is as below:

select
    created_date,
    request_name,
    count(*) as cnt
from
(
        select
            trunc(pbs.created_date) as created_date,
            pbr.request_name as request_name
        from
            prj_blb_slices pbs
            join prj_blb_slicerequests pbr on pbr.id = pbs.slice_request_id
        where
            pbs.created_date > sysdate - 1
    )
group by
    created_date,
    request_name

Actual numbers that got changed can be ascertained by running a query similar to the one below, before and after making changes to the 'Standard' calendar. The required slice_request_id and prj_object_id combination has to be passed.

SELECT
    sum(slice) sum_slice,
    slice_date,
    prj_object_id
FROM
    (
        SELECT
            trunc(slice_date, 'month') AS slice_date,
            slice,
            prj_object_id,
            slice_request_id
        FROM
            prj_blb_slices
    )
WHERE
    slice_request_id = 1
    AND prj_object_id = 5023997
GROUP BY
    slice_date,
    prj_object_id