Our pure JavaScript Scheduler component


Post by maxivalenzano »

Hi, I want to report a calendar bug.

The bug is that for some reason related to the calendars, the model wouldn't display/consider "stoppages".

In our app, we have 14 recurrent calendar entries for a resource, such as:

isWorking: true
name: "FN | October"
recurrentEndDate: "at 20:00 on Fri after 2024-09-30T08:00:00 before 2024-10-28T08:00:00"
recurrentStartDate: "at 20:00 on Mon after 2024-09-30T08:00:00 before 2024-10-28T08:00:00"

And several "stoppages/holidays", such as in the attached image.
By default, in non-specified time the resource does not work. The recurrent entries specify when it does work, and the stoppages/holidays also when it doesn't.

This scheme worked for a long time with many other resources, but some some reason (maybe the number of recurrent entries) this one failed.
We found that changing the order of the calendar entries made it work correctly (first recurrent entries and then stoppages/holidays; instead of first stoppages/holidays and then recurrent entries as we were doing before).

Attachments
Screenshot 2024-09-30 124449.png
Screenshot 2024-09-30 124449.png (52.5 KiB) Viewed 185 times

Post by marcio »

Hey maxivalenzano,

Thanks for reaching out.

Could you please share the data of your calendars for us to check? If you apply that data to one of our demos, do you still see that behavior? If you could share a runnable test case, that would be helpful for debugging and checking what's happening there.

Best regards,
Márcio


Post by maxivalenzano »

I didn't try to reproduce it in one of the demos. Here's the calendar data for the resource:

{
    "id": "calendar-machine-CRTBFN01",
    "name": "Work regime to the machine CRTBFN01",
    "cls": "patternsClsResource",
    "unspecifiedTimeIsWorking": false,
    "millId": 46,
    "intervals": [
        {
            "recurrentStartDate": "at 08:00 on Mon after 2024-08-26T08:00:00 before 2024-09-23T08:00:00",
            "recurrentEndDate": "at 07:59 on Mon after 2024-08-26T08:00:00 before 2024-09-23T08:00:00",
            "name": "CNR | New NDT Filler",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Mon after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Mon after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Mon after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Tue after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Tue after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Tue after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Tue after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Wed after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Wed after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Wed after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Wed after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Thu after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Thu after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Thu after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Thu after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Fri after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Fri after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Fri after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Fri after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Sat after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Sat after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Sat after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Sat after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Sun after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 08:00 on Sun after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 18:00 on Sun after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Sun after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "recurrentEndDate": "at 06:00 on Mon after 2024-09-23T08:00:00 before 2024-09-30T08:00:00",
            "name": "CNR | NDT (10 Hour Shifts M-F)",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Mon after 2024-09-30T08:00:00 before 2024-10-28T08:00:00",
            "recurrentEndDate": "at 20:00 on Fri after 2024-09-30T08:00:00 before 2024-10-28T08:00:00",
            "name": "FN | October",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "recurrentStartDate": "at 20:00 on Mon after 2024-10-28T08:00:00 before 2059-04-28T21:00:00",
            "recurrentEndDate": "at 20:00 on Fri after 2024-10-28T08:00:00 before 2059-04-28T21:00:00",
            "name": "FN | October",
            "isWorking": true,
            "iconCls": "b-fa b-fa-truck-loading"
        },
        {
            "id": "holiday-36",
            "name": "Memorial Day",
            "startDate": "2024-05-27T08:00:00-03:00",
            "endDate": "2024-05-28T08:00:00-03:00",
            "isWorking": false,
            "cls": "holidayClsResource"
        },
        {
            "id": "holiday-43",
            "name": "Labor Day",
            "startDate": "2024-09-02T08:00:00-03:00",
            "endDate": "2024-09-03T08:00:00-03:00",
            "isWorking": false,
            "cls": "holidayClsResource"
        },
        {
            "comments": "XOM Audit",
            "endDate": "2024-08-30T20:00:00-03:00",
            "id": 0,
            "startDate": "2024-08-30T08:00:00-03:00",
            "typeId": 11,
            "isWorking": false,
            "name": "Test and try outs-554",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Test and try outs",
                "comments": "XOM Audit"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-05T08:00:00-03:00",
            "id": 1,
            "startDate": "2024-09-03T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-601",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-02T08:00:00-03:00",
            "id": 2,
            "startDate": "2024-08-31T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-602",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "PM",
            "endDate": "2024-10-02T20:00:00-03:00",
            "id": 3,
            "startDate": "2024-10-02T08:00:00-03:00",
            "typeId": 6,
            "isWorking": false,
            "name": "Scheduled repairs-604",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Scheduled repairs",
                "comments": "PM"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-06T08:00:00-03:00",
            "id": 4,
            "startDate": "2024-09-05T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-620",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-07T08:00:00-03:00",
            "id": 5,
            "startDate": "2024-09-06T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-606",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-10T08:00:00-03:00",
            "id": 6,
            "startDate": "2024-09-09T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-617",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-10-21T20:00:00-03:00",
            "id": 7,
            "startDate": "2024-10-19T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-643",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-13T08:00:00-03:00",
            "id": 8,
            "startDate": "2024-09-12T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-642",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-16T20:00:00-03:00",
            "id": 9,
            "startDate": "2024-09-14T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-649",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-09-23T08:00:00-03:00",
            "id": 10,
            "startDate": "2024-09-22T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-669",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        },
        {
            "comments": "Stoppage for 7.625\"",
            "endDate": "2024-09-19T04:00:00-03:00",
            "id": 11,
            "startDate": "2024-09-18T22:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-648",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage for 7.625\""
            }
        },
        {
            "comments": "Townhall",
            "endDate": "2024-10-16T16:00:00-03:00",
            "id": 12,
            "startDate": "2024-10-16T14:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-679",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Townhall"
            }
        },
        {
            "comments": "Townhall",
            "endDate": "2024-10-16T21:00:00-03:00",
            "id": 13,
            "startDate": "2024-10-16T19:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-680",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Townhall"
            }
        },
        {
            "comments": "Stoppage",
            "endDate": "2024-11-01T08:00:00-03:00",
            "id": 14,
            "startDate": "2024-10-30T08:00:00-03:00",
            "typeId": 3,
            "isWorking": false,
            "name": "Not scheduled shifts-681",
            "cls": "stoppageClsResource",
            "iconCls": "b-fa b-fa-digging",
            "millId": 46,
            "machineId": 6,
            "resourceId": "CRTBFN01",
            "dataTask": {
                "taskType": "stoppage",
                "stopTypeName": "Not scheduled shifts",
                "comments": "Stoppage"
            }
        }
    ],
    "parentId": "calendars-rootNode"
}

Post by alex.l »

Hi,

Please describe steps to reproduce, actual result and expected result.
What should we do with this data? Apply to a task? What's the nest steps? Did you test it yourself and see the problem reproducible?
Full guide how to ask for help is here viewtopic.php?f=1&t=772

Thank you!

All the best,
Alex


Post by maxivalenzano »

Hi,

I'm sorry but I can't share the full dataset as there is sensitive information.
I tried my best to explain the steps to try to reproduce the issue. The shared data is the calendars (the calendars.rows fed to the crud manager) for the resource (machine) that experienced the issue.
In my particular case the issue was solved by this:

We found that changing the order of the calendar entries made it work correctly (first recurrent entries and then stoppages/holidays; instead of first stoppages/holidays and then recurrent entries as we were doing before).

As the issue is no longer present with that adjustment, I can't expend much additional time trying to reproduce it in one of the online examples.

Best regards,


Post by alex.l »

Hi maxivalenzano,

Ok, thanks for notification and glad to hear you fixed it, please feel free to ping us if/when you will be able to collect all required information. Right now we can't continue investigations because the information is not complete and we are not able to test this bug.

We will be happy if you'll find time to collect all at once and guide us how to reproduce the problem. Of course, when you have time.

All the best,
Alex


Post Reply