5
11
Fork
You've already forked tomato
1

UI to clean up duplicate event occurrences #30

Merged
edwardloveall merged 1 commit from el-shift-event-culling into main 2025年10月14日 15:02:36 +02:00

Two new views:

  • /shift_event_comparisons?ids[]=shift_event_id&ids[]=shift_event_id
  • /shift_occurrence_comparisons/:shift_id

A grid showing times as the Y-axis and numbers as the X-axis. The grid is mostly white with a smattering of green and red cells.
A detailed look at the shifts with most details blurred out and a few command to copy at the bottom.

The comparisons shows a grid of events for a shift and their occurrences so you can find overlaps. Clicking on multiple events and clicking Compare will take you to a page that shows more detail about each event including logs, notes, and details recurrence information. It also includes commands you can run in a rails console to remove these duplicates.

The workflow is:

  • Find duplicates on the comparisons page
  • Select the first group of events on the page
  • Compare in the detail view
  • Use the commands provided to add exdates, move task logs, or otherwise delete duplicate events so that only one occurrence remains

These are only allowed to be seen/used by Becks and Edward (or users with their IDs).

This also introduces a couple of tools to make some of the more advanced comparisons easier.

  • TaskLog#console_view will get the detail needed to remove duplicate task logs that may have been created:
TaskLog.where(shift_event_id: [...])
 .order(:task_id, :food_taxonomy_id, :weight)
 .map(&:console_view)
  • Absence.near shows absences in a 2-month window around a central point to help figure out what volunteer should be on a shift.
Absence.find_by(user_id: ...).near(Time.new(2025, 10, 1))
Two new views: * `/shift_event_comparisons?ids[]=shift_event_id&ids[]=shift_event_id` * `/shift_occurrence_comparisons/:shift_id` ![A grid showing times as the Y-axis and numbers as the X-axis. The grid is mostly white with a smattering of green and red cells.](/attachments/05412b62-a4d5-4427-835b-cb951dc55c97) ![A detailed look at the shifts with most details blurred out and a few command to copy at the bottom.](/attachments/57d89064-7666-4b4b-b1ac-b04984f87f0e) The comparisons shows a grid of events for a shift and their occurrences so you can find overlaps. Clicking on multiple events and clicking `Compare` will take you to a page that shows more detail about each event including logs, notes, and details recurrence information. It also includes commands you can run in a rails console to remove these duplicates. The workflow is: * Find duplicates on the comparisons page * Select the first group of events on the page * Compare in the detail view * Use the commands provided to add exdates, move task logs, or otherwise delete duplicate events so that only one occurrence remains These are only allowed to be seen/used by Becks and Edward (or users with their IDs). This also introduces a couple of tools to make some of the more advanced comparisons easier. * `TaskLog#console_view` will get the detail needed to remove duplicate task logs that may have been created: ```rb TaskLog.where(shift_event_id: [...]) .order(:task_id, :food_taxonomy_id, :weight) .map(&:console_view) ``` * `Absence.near` shows absences in a 2-month window around a central point to help figure out what volunteer should be on a shift. ```rb Absence.find_by(user_id: ...).near(Time.new(2025, 10, 1)) ```
UI to clean up duplicate event occurrences
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
5c270edb9e
Two new views:
* `/shift_event_comparisons?ids[]=shift_event_id&ids[]=shift_event_id`
* `/shift_occurrence_comparisons/:shift_id`
The comparisons shows a grid of events for a shift and their occurrences so you can find overlaps. Clicking on multiple events and clicking `Compare` will take you to a page that shows more detail about each event including logs, notes, and details recurrence information. It also includes commands you can run in a rails console to remove these duplicates.
The workflow is:
* Find duplicates on the comparisons page
* Select the first group of events on the page
* Compare in the detail view
* Use the commands provided to add exdates, move task logs, or otherwise delete duplicate events so that only one occurrence remains
These are only allowed to be seen/used by Becks and Edward (or users with their IDs).
This also introduces a couple of tools to make some of the more advanced comparisons easier.
* `TaskLog#console_view` will get the detail needed to remove duplicate task logs that may have been created:
```rb
TaskLog.where(shift_event_id: [...])
 .order(:task_id, :food_taxonomy_id, :weight)
 .map(&:console_view)
```
* `Absence.near` shows absences in a 2-month window around a central point to help figure out what volunteer should be on a shift.
```rb
Absence.find_by(user_id: ...).near(Time.new(2025, 10, 1))
```
thetizzo left a comment
Copy link

Looks good!

Looks good!
edwardloveall deleted branch el-shift-event-culling 2025年10月14日 15:02:37 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!30
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-shift-event-culling"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?