This guide covers all functionality of the bidirectional task sync system between Master Tasks and Crew sheets.
The system syncs tasks between:
- Master Tasks (source of truth) - contains all tasks
- Crew Sheets (Ops, Biz Dev, etc.) - contain tasks assigned to that crew
Key features:
- Bidirectional sync via onEdit triggers
- Field-level sync (only changed columns are synced)
- Early timestamp protection (prevents overwrites during concurrent edits)
- New rows inserted at top of table (no sorting during sync)
Purpose: Verify edits in Master propagate to crew sheets.
Steps:
- Open Master Tasks spreadsheet
- Find a task that has
Crews = "Biz Dev"(or any crew) - Edit the Notes field for that task
- Wait 5-10 seconds for sync
Expected Result:
- The same task in Biz Dev Crew sheet should have the updated Notes
- Check the Sync Logs sheet in Master for
MASTER_TO_CREWSandSYNC_COMPLETEentries
Purpose: Verify edits in a crew sheet propagate to Master and other crews.
Steps:
- Open Biz Dev Crew spreadsheet
- Find a task that has
Crews = "Biz Dev, Ops"(shared with another crew) - Edit the Notes field for that task
- Wait 5-10 seconds for sync
Expected Result:
- Master Tasks should have the updated Notes
- Ops Crew should also have the updated Notes (since task is shared)
- Check Sync Logs for
CREW_TO_MASTERandSYNC_COMPLETEentries
Purpose: Verify new tasks created in a crew sheet sync to Master.
Steps:
- Open Ops Crew spreadsheet
- Add a new row at the top of the Tasks table (below the header)
- Fill in:
Task = "Test Task from Ops",Priority = "1. High",Crews = "Ops" - Wait 5-10 seconds
Expected Result:
- Task should get a TaskID assigned automatically
- Task should appear in Master Tasks
Crewsfield should include "Ops"- Check Sync Logs for
CREW_TO_MASTERentry
Purpose: Verify new tasks with multiple crews propagate correctly.
Steps:
- Open Biz Dev Crew spreadsheet
- Add a new task:
Task = "Shared Test Task",Crews = "Biz Dev, Ops" - Wait 5-10 seconds
Expected Result:
- Task appears in Master Tasks with
Crews = "Biz Dev, Ops" - Task appears in Ops Crew sheet
- Task remains in Biz Dev Crew sheet
Purpose: Verify adding a crew to an existing task adds the task to that crew's sheet.
Steps:
- Open Master Tasks
- Find a task that has
Crews = "Ops"only - Edit
Crewsto"Ops, Biz Dev" - Wait 5-10 seconds
Expected Result:
- Task should now appear in Biz Dev Crew sheet
- Task remains in Ops Crew sheet
Purpose: Verify removing a crew from a task removes it from that crew's sheet.
Steps:
- Open Master Tasks
- Find a task that has
Crews = "Biz Dev, Ops" - Edit
Crewsto just"Ops"(remove Biz Dev) - Wait 5-10 seconds
Expected Result:
- Task should be deleted from Biz Dev Crew sheet
- Task remains in Ops Crew sheet
- Check Sync Logs for
PROPAGATE_DELETEentry
Purpose: Verify a user can remove their own crew from a task in their sheet.
Steps:
- Open Biz Dev Crew spreadsheet
- Find a task with
Crews = "Biz Dev, Ops" - Edit
Crewsto just"Ops"(remove Biz Dev) - Wait 5-10 seconds
Expected Result:
- Task should be deleted from Biz Dev Crew sheet
- Task remains in Ops Crew with
Crews = "Ops" - Master updated to
Crews = "Ops" - Check Sync Logs for
CREW_REMOVEDentry
Purpose: Verify two users editing different fields of the same task don't overwrite each other.
Steps:
- Find a task that exists in both Biz Dev Crew and Ops Crew
- Quickly (within 5 seconds of each other):
- In Biz Dev: Edit the Notes field to "Biz Dev edit"
- In Ops: Edit the Priority field to "0. Top"
- Wait 10-15 seconds for both syncs to complete
Expected Result:
- Master Tasks should have BOTH changes:
- Notes = "Biz Dev edit"
- Priority = "0. Top"
- Both crew sheets should have both changes
- Neither edit should be lost
Purpose: Verify that when two users edit the same field, the last one wins.
Steps:
- Find a task that exists in both crew sheets
- Note the current Notes value
- Quickly:
- In Biz Dev: Edit Notes to "Edit A"
- In Ops: Edit Notes to "Edit B"
- Wait 10-15 seconds
Expected Result:
- The edit with the later timestamp wins
- All sheets should have the same Notes value
- No data corruption or duplicates
Purpose: Verify that creating a task in a crew sheet automatically adds that crew.
Steps:
- Open Ops Crew spreadsheet
- Add a new task with
Crewsfield empty or set to just"Biz Dev" - Wait 5-10 seconds
Expected Result:
Crewsfield should automatically include "Ops" (the current sheet's crew)- If you set
Crews = "Biz Dev", it should become"Biz Dev, Ops" - Check Sync Logs for
CREW_ADDEDentry
Purpose: Verify blank rows don't trigger sync or get IDs.
Steps:
- Open any crew sheet
- Add a completely blank row in the Tasks table
- Wait 5 seconds
Expected Result:
- No sync should occur
- No TaskID should be assigned
- No entries in Sync Logs
Purpose: Verify the Task Sync menu works correctly.
- Click Task Sync > Validate setup
- Should show any missing columns or configuration issues
- Click Task Sync > Reconcile: push master to crews
- Should sync all tasks from Master to appropriate crew sheets
- Useful for fixing any out-of-sync data
- Click Task Sync > Bootstrap: add IDs + copy to master
- Should assign TaskIDs to any tasks missing them
- Should copy all crew tasks to Master
Purpose: Verify the system handles concurrent operations gracefully.
Steps:
- Make rapid edits (3-4 edits within 2 seconds) to different tasks
- Check Sync Logs
Expected Result:
- Some edits may show
LOCK_FAILED(this is OK - means another sync was running) - No data corruption
- All edits should eventually sync (may need to re-edit if lock failed)
Purpose: Verify the system doesn't create duplicate rows.
Steps:
- Add a new task in a crew sheet
- Immediately edit another field in the same row
- Check both Master and crew sheet
Expected Result:
- Only ONE row should exist for the task
- No duplicate TaskIDs
- Run
node verify-sync.js auditto confirm no duplicates
Open the Sync Logs sheet in Master Tasks to see recent sync activity.
cd google-apps-scripts
node verify-sync.js auditnode verify-sync.js verify [TaskID]node verify-sync.js logs 20node reconcile-all.js- Check if the trigger is installed: Extensions > Apps Script > Triggers
- Each spreadsheet should have an
onEditTriggerpointing toTaskSyncLib.handleEdit - Check Sync Logs for errors
- Run
node verify-sync.js auditto find them - Run
node cleanup-duplicates.jsto remove them - Or manually delete the duplicate rows
- Check the
Crewsfield in Master - does it include that crew? - Run Task Sync > Reconcile from the menu
- Check Sync Logs for errors
- Master is the source of truth
- Run Task Sync > Reconcile to push Master data to all crews
- Or run
node reconcile-all.js
- v13: Field-level sync (only sync edited columns)
- v12: Early timestamp stamping (protect pending edits)
- v11: Remove sorting, insert new rows at top
- v10: Propagation logging
- v9: Fix new task crew membership
- v8-v7: Logging and duplicate fixes