Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must Finish On constraint is violated #10626

Closed
arcady-zherdev opened this issue Jan 17, 2025 · 3 comments
Closed

Must Finish On constraint is violated #10626

arcady-zherdev opened this issue Jan 17, 2025 · 3 comments
Assignees
Labels
bug Something isn't working large-account Reported by large customer OEM OEM customer resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@arcady-zherdev
Copy link

Steps to reproduce:

  1. open advanced demo
  2. choose "Business" as the project calendar in the toolbar
  3. change "Install Apache" task duration to "1 day"
  4. clear the task constraint type and date
  5. set the task constraint to "Must finish on"
  6. change the constraint date to "Jan 16, 2025"

Result: the task end date is "Jan 16, 2025 17:00"

bryntum.query('gantt').tasks[2].endDate
@arcady-zherdev arcady-zherdev added the bug Something isn't working label Jan 17, 2025
@maartenraes
Copy link

maartenraes commented Jan 17, 2025

Original query from client

When a project has a calendar which defines the working hours, we see an issue with scheduling of task with must finish on constraint.
Changing constraintDate of the task results in it getting scheduled exactly 1 day early. Ideally what we understand from must finish on , is that the endDate would include working hours of the constraintDate . If I would only change the constraintType to must finish on , then the constraintDate is correct. But if I manually update the constraintDate, the endDate is exactly one day off. I have attached a video for better understanding.
I think whats happening is, manually changing constraintDate is setting time to be 00:00 hours , hence causing an issue while scheduling.

Gantt config

import {TaskModel} from "@bryntum/gantt-thin";

class MyTaskModel extends TaskModel {
    static get fields() {
        return [
            {name: 'importantDate', type: 'date'}
        ]
    }
}

const ganttProps = {
    // columns    : [{ type : 'name', field : 'name', width : 250 }],

    tooltip : "My cool Bryntum Gantt component",
    viewPreset : 'hourAndDay',
    barMargin  : 10,
    columns : [
        { type : 'wbs', hidden : true },
        { type : 'name', width : 250, showWbs : true },
        { type : 'startdate' },
        { type : 'enddate' },
        { type : 'duration' },
        { type : 'constrainttype' },
        { type : 'constraintdate' },
    ],
    filterFeature : true,
    project : {
        taskModelClass : MyTaskModel,
        transport : {
            load : {
                url : 'data/data.json',
            }
        },
        autoLoad           : true,
        // Automatically introduces a `startnoearlier` constraint for tasks that (a) have no predecessors, (b) do not use
        // constraints and (c) aren't `manuallyScheduled`
        autoSetConstraints : true
        ,
        timeRangeStore:true,
        stm : {
            autoRecord : true
        },
    },


};

export { ganttProps };

Data.json

{
  "success" : true,

  "project" : {
    "calendar"     : 777,
    "startDate"    : "2019-01-14",
    "endDate"    : "2019-01-18",
    "hoursPerDay"  : 8,
    "daysPerWeek"  : 5,
    "daysPerMonth" : 20
  },

  "calendars": {
    "rows": [
      {
        "id": 777,
        "name": "business",
        "intervals": [
          {
            "id"                 : 123,
            "recurrentStartDate" : "every weekday at 00:00",
            "recurrentEndDate"   : "every weekday at 13:00",
            "isWorking"          : false
          },
          {
            "id"                 : 456,
            "recurrentStartDate" : "every weekday at 21:00",
            "recurrentEndDate"   : "every weekday at 00:00",
            "isWorking"          : false
          }
        ]
      }
    ]
  },

  "tasks" : {
    "rows" : [
      {
        "id"          : 1000,
        "name"        : "task 1",
        "percentDone" : 50,
        "startDate"   : "2019-01-14T13:00:00",
        "endDate"   : "2019-01-14T21:00:00"
      }
    ]
  }
}

@maartenraes maartenraes added large-account Reported by large customer OEM OEM customer labels Jan 17, 2025
@ghulamghousdev
Copy link
Member

Another report here: https://forum.bryntum.com/viewtopic.php?p=161411#p161411
Same reproduction steps as shown in the ticket description: https://codepen.io/udALMG/pen/XJrPyWN

@arcady-zherdev arcady-zherdev added this to the 6.1.6 milestone Jan 24, 2025
@arcady-zherdev arcady-zherdev added the resolved Fixed but not yet released (available in the nightly builds) label Jan 24, 2025
@arcady-zherdev
Copy link
Author

A related ticket for UI part is #10660

@isglass isglass closed this as completed Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working large-account Reported by large customer OEM OEM customer resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

4 participants