Our pure JavaScript Scheduler component


Post by peter4ef »

Hello,

I was investigating some weird behaviour in our project for events with the schedulingMode 'FixedEffort'. However when I took the v6.1.6 schedulerPro examples\frameworks\react\javascript\resource-histogram I could not add this field to the advanced tab. I thought this field would be present by default, but it wasn't. After adding the following code to the schedulerconfig:

    taskEditFeature : {
            items : {
                advancedTab      : {
                    schedulingModeField : {
                    type   : 'schedulingmodecombo',
                    weight : 300,
                    name   : 'schedulingMode',
                    label  : 'L{Scheduling mode}',
                },
                }
            }
        },

or when simply using:

    taskEditFeature : {
            items : {
                advancedTab      : {
                    schedulingModeField : true
                }
            }
        },

I get the following error when starting the project:

1.chunk.js:9720 Uncaught (in promise) TypeError: Cannot set property schedulingModeField of #<SchedulerAdvancedTab> which has only a getter
    at SchedulerAdvancedTab.set (1.chunk.js:9720:20)
    at SchedulerAdvancedTab.setConfig (1.chunk.js:10885:17)
    at SchedulerAdvancedTab.configure (1.chunk.js:10797:8)
    at SchedulerAdvancedTab.construct (1.chunk.js:10458:12)
    at SchedulerAdvancedTab.construct (1.chunk.js:19167:13)
    at SchedulerAdvancedTab.construct (1.chunk.js:12329:13)
    at SchedulerAdvancedTab.construct (1.chunk.js:51443:11)
    at new _Base (1.chunk.js:10429:8)
    ...

Is this field not available in the SchedulerPro?

If instead of adding it to the tab, I simply change the data I also get an error. If I change an event to:

  "events" : {
    "rows" : [
      {
        "id"        : 1,
        "startDate" : "2020-04-27",
        "duration"  : 4,
        "name"      : "Conference",
        "iconCls"   : "b-fa b-fa-calendar",
        "schedulingMode": "FixedEffort"
      },

This results in a blank screen and the following error:

0.chunk.js:206043 Uncaught (in promise) Error: Unknown formula for `units`
    at ModelClass.calculateAssignmentUnits (0.chunk.js:206043:17)
    at calculateAssignmentUnits.next (<anonymous>)
    at ModelClass.calculateUnits (0.chunk.js:204177:38)
    at calculateUnits.next (<anonymous>)
    at Quark.continueCalculation (0.chunk.js:195922:49)
    at EngineTransaction.onReadIdentifier (0.chunk.js:197130:26)
    at EngineTransaction.calculateTransitionsStackGen (0.chunk.js:197244:47)
    at calculateTransitionsStackGen.next (<anonymous>)
    at EngineTransaction.calculateTransitions (0.chunk.js:197162:19)
    at calculateTransitions.next (<anonymous>)
    at runGeneratorAsyncWithEffect (0.chunk.js:196020:104)
    at async EngineReplica.doCommitAsync (0.chunk.js:197637:31)
    at async ProjectModel2.internalDelayCalculation (0.chunk.js:201956:22)

The weird behaviour I was looking into was a wrongly calculated duration. The project has 24 hours per day, however the resources have a schedule of 8 hours a day. Then when an event is set to EffortDriven: true, SchedulingMode: 'FixedEffor', assignment unit: 100. The duration is sometimes recalculated incorrectly, and is 1/3 of what it should be. The event is drawn as 2.5 days, which with effort: 20 is correct, however the value in the duration column is 0.8. But this did not always happen.


Post by arcady »

Hello,

Scheduler Pro has not FixedEffort mode. It's a part of the Gantt code. And Scheduler Pro has only Normal and FixedDuration onboard.

Regarding the field you missed items under advancedTab and the field has hidden : true so you need to set it to false:

taskEditFeature : {
    items : {
        advancedTab : {
            items : {
                schedulingModeField : { hidden : false }
            }
        }
    }
},

Example in the docs: https://bryntum.com/products/gantt/docs/api/SchedulerPro/feature/TaskEdit#removing-a-built-in-item-or-toolbar-button

Best regards,
Arcady


Post by arcady »

P.S. regarding the wrongly calculated values we need a test case or steps allowing to reproduce the issue on some of our demos.


Post Reply