Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1927

It's possible to remove the depot even if it's not the last location

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • 2
    • NEW
    • NEW

      This is possible due to a UI bug:

      1. Go to the Route screen.
      2. Select vehicle that has no visits (stays in the depot).
      3. The depot is on its itinerary list (that's OK) but its remove button should be disabled, and it's enabled.

      This is a corner case issue and is easy to fix but it can be used to demonstrate much more important problem and that is the lack of atomicity in LocationService.removeLocation().

      The backend needs to be super defensive. It's nice that the UI disables elements to avoid invalid actions but it can contain glitches like this. The backend must not rely on valid input.

      Another problem: First, location is removed in service layer, then business logic in a plugin says it's not allowed to remove it, and then we need to roll back. This is because the business logic (depot vs. visits) is being implemented in a plugin (planner).

            jlocker Jiří Locker
            jlocker Jiří Locker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: