End Dates In Scheduling is does not change even if calendar is assigned to Task

Support for our reactive computational engine


Post Reply
User avatar
rahulranjan
Premium Member
Premium Member
Posts: 497
Joined: Mon Apr 29, 2019 8:43 pm

End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by rahulranjan »

Hi

  1. For the Below Task (Event1) if i define night calendar the effort for 1 day should be 8 hours but it o/p 24 hours which is default , calendar is not taken into consideration. ? If Duration is 2 then effort should be 2* 8 = 16 hours . It should be based on calendar.
  2. I have defined a calender of 8 hours per day i.e night calendar so if the task duration is 1.
    Start Date is :Tue Dec 01 2020 00:00:00 GMT+0530 (India Standard Time)
    then
    End Date is :Fri Dec 02 2020 00:00:00 GMT+0530 (India Standard Time)
    should be the above
    But it gives
    start Date is :Tue Dec 01 2020 00:00:00 GMT+0530 (India Standard Time)
    End Date is :Fri Dec 04 2020 00:00:00 GMT+0530 (India Standard Time)

Why ?

Code: Select all


import { GanttProjectMixin } from "./lib/Engine/quark/model/gantt/GanttProjectMixin.js";

const project = new GanttProjectMixin({
  eventsData: [
    {
      id: "e1",
      name: "Event1",
      startDate: new Date(2020, 11, 1),
      duration: 1,
      calendar: "night",
      manuallyScheduled: false
    },
    {
      id: "e2",
      name: "Event2",
      startDate: new Date(2020, 11, 1),
      duration: 1,
      calendar: "business",
      manuallyScheduled: false
    }
  ],
  calendarsData: [
    {
      id: "general",
      name: "24 Hour Calender",
      intervals: [
        {
          recurrentStartDate: "on Sat at 0:00",
          recurrentEndDate: "on Mon at 0:00",
          isWorking: false
        }
      ],
      expanded: true,
      children: [
        {
          id: "business",
          name: "6 Hour Calender",
          hoursPerDay: 6,
          daysPerWeek: 5,
          daysPerMonth: 20,
          intervals: [
            {
              recurrentStartDate: "every weekday at 12:00",
              recurrentEndDate: "every weekday at 13:00",
              isWorking: false
            },
            {
              recurrentStartDate: "every weekday at 17:00",
              recurrentEndDate: "every weekday at 08:00",
              isWorking: false
            }
          ]
        },
        {
          id: "night",
          name: "Night shift",
          hoursPerDay: 8,
          daysPerWeek: 5,
          daysPerMonth: 20,
          intervals: [
            {
              recurrentStartDate: "every weekday at 6:00",
              recurrentEndDate: "every weekday at 22:00",
              isWorking: false
            }
          ]
        }
      ]
    }
  ],
  dependenciesData: []
});

await project.commitAsync();
const event1 = project.getEventById("e1");
console.log("Start Date is :" + event1.startDate);
console.log("End Date is :" + event1.endDate);
const event2 = project.getEventById("e2");
console.log("E2 Start: " + event2.startDate);
console.log("E2 End: " + event2.endDate);

Where is Effort Calculation Code . In Engine And Base Calendar Config is Defined Where .
Why it takes 24 hours per day by dafault .


User avatar
nickolay
Core Developer
Core Developer
Posts: 3488
Joined: Mon May 16, 2011 10:48 am

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by nickolay »

We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
rahulranjan
Premium Member
Premium Member
Posts: 497
Joined: Mon Apr 29, 2019 8:43 pm

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by rahulranjan »

Hi
1.If you see we define hoursPerDay on Calendar Too .

  1. If we want to do for Particular Task

User avatar
rahulranjan
Premium Member
Premium Member
Posts: 497
Joined: Mon Apr 29, 2019 8:43 pm

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by rahulranjan »

rahulranjan wrote:
Wed Dec 30, 2020 11:21 am

Hi

  1. For the Below Task (Event1) if i define night calendar the effort for 1 day should be 8 hours but it o/p 24 hours which is default , calendar is not taken into consideration. ? If Duration is 2 then effort should be 2* 8 = 16 hours . It should be based on calendar.
  2. I have defined a calender of 8 hours per day i.e night calendar so if the task duration is 1.
    Start Date is :Tue Dec 01 2020 00:00:00 GMT+0530 (India Standard Time)
    then
    End Date is :Fri Dec 02 2020 00:00:00 GMT+0530 (India Standard Time)
    should be the above
    But it gives
    start Date is :Tue Dec 01 2020 00:00:00 GMT+0530 (India Standard Time)
    End Date is :Fri Dec 04 2020 00:00:00 GMT+0530 (India Standard Time)

Why ?

Code: Select all


import { GanttProjectMixin } from "./lib/Engine/quark/model/gantt/GanttProjectMixin.js";

const project = new GanttProjectMixin({
  eventsData: [
    {
      id: "e1",
      name: "Event1",
      startDate: new Date(2020, 11, 1),
      duration: 1,
      calendar: "night",
      manuallyScheduled: false
    },
    {
      id: "e2",
      name: "Event2",
      startDate: new Date(2020, 11, 1),
      duration: 1,
      calendar: "business",
      manuallyScheduled: false
    }
  ],
  calendarsData: [
    {
      id: "general",
      name: "24 Hour Calender",
      intervals: [
        {
          recurrentStartDate: "on Sat at 0:00",
          recurrentEndDate: "on Mon at 0:00",
          isWorking: false
        }
      ],
      expanded: true,
      children: [
        {
          id: "business",
          name: "6 Hour Calender",
          hoursPerDay: 6,
          daysPerWeek: 5,
          daysPerMonth: 20,
          intervals: [
            {
              recurrentStartDate: "every weekday at 12:00",
              recurrentEndDate: "every weekday at 13:00",
              isWorking: false
            },
            {
              recurrentStartDate: "every weekday at 17:00",
              recurrentEndDate: "every weekday at 08:00",
              isWorking: false
            }
          ]
        },
        {
          id: "night",
          name: "Night shift",
          hoursPerDay: 8,
          daysPerWeek: 5,
          daysPerMonth: 20,
          intervals: [
            {
              recurrentStartDate: "every weekday at 6:00",
              recurrentEndDate: "every weekday at 22:00",
              isWorking: false
            }
          ]
        }
      ]
    }
  ],
  dependenciesData: []
});

await project.commitAsync();
const event1 = project.getEventById("e1");
console.log("Start Date is :" + event1.startDate);
console.log("End Date is :" + event1.endDate);
const event2 = project.getEventById("e2");
console.log("E2 Start: " + event2.startDate);
console.log("E2 End: " + event2.endDate);

Where is Effort Calculation Code . In Engine where is Base Calendar Config is Defined Where .
Why it takes 24 hours per day by dafault . - Looking for this too.


User avatar
nickolay
Core Developer
Core Developer
Posts: 3488
Joined: Mon May 16, 2011 10:48 am

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by nickolay »

Rahulranjan, it is already very hard to understand what you mean, since you formulate yourself very chaotically, but in addition you include random quotations and posts like:

Hi
1.If you see we define hoursPerDay on Calendar Too .

If we want to do for Particular Task

It won't work this way.

Try to be more clear. Ask one question at a time. Formulate yourself clearly (perhaps use a Google translator if your English is not good enough). Do not include random quotations. Help us to help you.

Lets start over. What is your question again?

We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
rahulranjan
Premium Member
Premium Member
Posts: 497
Joined: Mon Apr 29, 2019 8:43 pm

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by rahulranjan »

:D :lol: cool

  1. Where in Code Default Calendar Config is Defined ? Enngine
  2. How can we define hoursPerday for Calendar ?

User avatar
nickolay
Core Developer
Core Developer
Posts: 3488
Joined: Mon May 16, 2011 10:48 am

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by nickolay »

1) Default calendar config? What config exactly you mean? Please point with a link to documentation.
2) You can't. Duration conversion rules are defined globally for the whole project.

We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
nickolay
Core Developer
Core Developer
Posts: 3488
Joined: Mon May 16, 2011 10:48 am

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by nickolay »

Also,
1) Do not uppercase words randomly:

Where in Code Default Calendar Config is Defined ? Enngine

2) Do not insert random words at the end of the sentence.

Where in Code Default Calendar Config is Defined ? Enngine

We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
nickolay
Core Developer
Core Developer
Posts: 3488
Joined: Mon May 16, 2011 10:48 am

Re: End Dates In Scheduling is does not change even if calendar is assigned to Task

Post by nickolay »

Regarding the 1), perhaps you mean the calendar config of the project: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_gantt_ganttprojectmixin_.ganttprojectmixin.html#calendar

This calendar is used by any task/resource that don't have an explicitly provided calendar.

We offer training in both Ext JS and our products, read more here.
Read the API documentation

Post Reply