Hi
- 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.
- 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 ?
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 .
Hi,
The calendar does not have the hoursPerDay/daysPerWeek/daysPerMonth
configs: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_scheduler_basic_basecalendarmixin_.basecalendarmixin.html
Those are on project and used globally by all tasks and calendars: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_gantt_ganttprojectmixin_.ganttprojectmixin.html#hoursperday
Read the API documentation
rahulranjan wrote: ↑Wed Dec 30, 2020 11:21 amHi
- 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.
- 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 ?
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.
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?
Read the API documentation
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.
Read the API documentation
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
Read the API documentation
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.
Read the API documentation