Skip to content
Snippets Groups Projects

Resolve "Changing the date of a slotted lab does not move the slots"

What does this mr do?

If a slotted lab is edited, it's slots won't update since they are represented by a Slot which has a fixed start and end. This needs to be switched to an offset based on the start of the lab. `

Actions taken to fix bug

Added a new offsetSequence number to denote the position of a slot within a slotted lab. The reason we did not get rid of the slot from the timeslot completely, was that it did not work with QueryDSL.

Screenshots

Before Change: image

After Change: image

Note that this MR does not support a change in the length of the lab whilst the offset changes. This will be addressed in another MR.

Does this MR meet the acceptance criteria?

  • I have added a changelog entry to reflect the significant changes I made and the bug I fixed.
  • A test was created to test the bug.
  • I have updated the documentation accordingly.
  • I adhere to the style guide.
Edited by Henry Page

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Resolved by Henry Page

      I see you have opted for adding a sequence number to the time-slots. This does indeed resolve some tracking issues we had by not knowing the index of a time-slot, but it also opens the door for a few new issues:

      By keeping track of both slot times and slot indexes, either could be forgotten during updates in new code. If a desync occurs, we'll probably open Queue up for a whole new set of Database issues :sweat_smile:.

      I was hoping to only use sequencing numbers and calculate the slot on-demand. Perhaps this could be as easy as making the Slot class calculate its length without storing and retrieving this information from the database. This way we need to make minimal changes while also removing the need for storing the slot times for every slot.

  • As for the migrations, I'll work on a few queries when you've looked at my suggestions as we will need separate ones for postgresql and mariadb.

  • Henry Page added 1 commit

    added 1 commit

    • 86596853 - new offset based implementation, QueryDSL broken

    Compare with previous version

  • Henry Page added 1 commit

    added 1 commit

    • 894fd451 - Revert "new offset based implementation, QueryDSL broken"

    Compare with previous version

  • Chris Lemaire added 1 commit

    added 1 commit

    • ba81176e - Add migration for ranking time-slots

    Compare with previous version

  • Chris Lemaire added 1 commit

    added 1 commit

    • c3ed3262 - Add migration for ranking time-slots

    Compare with previous version

  • Chris Lemaire added 1 commit

    added 1 commit

    • c08244e2 - Add migration for ranking time-slots

    Compare with previous version

  • Chris Lemaire added 1 commit

    added 1 commit

    • 9b2b49df - Add migration for ranking time-slots

    Compare with previous version

  • Chris Lemaire added 1 commit

    added 1 commit

    • 649bf693 - Add migration for ranking time-slots

    Compare with previous version

  • Chris Lemaire added 1 commit

    added 1 commit

    • c66bb614 - Add migration for ranking time-slots

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading