Flushes
Flushes represent the harvest cycles within a planting. Each planting typically has multiple flushes (Flush 1, Flush 2, Flush 3) that occur at different times during the crop cycle. The Flushing page is a special workflow that helps you assign flush numbers to harvest dates based on actual transaction data.
Overview
Section titled “Overview”Purpose: Track which harvest dates belong to which flush cycle, organizing harvest data into meaningful harvest periods.
A Flush record contains:
- Name - Flush name (typically “Flush1”, “Flush2”, “Flush3”)
- Planting - Which planting this flush belongs to
- Room - The room (derived from the planting)
- Flush Number (Sequence) - The flush number (1, 2, or 3)
- Start Date - First harvest date for this flush
- End Date - Last harvest date for this flush
Key Concepts:
- Flush Numbers: Sequential harvest cycles (Flush 1, then Flush 2, then Flush 3)
- Flushing Page: Special workflow screen to assign flush numbers to harvest dates
- Transaction Dates: The system shows you harvest dates with total weights to help you decide which dates belong to which flush
Viewing Flushes
Section titled “Viewing Flushes”- Click Flushes in the sidebar menu (under Farm Management)
- You’ll see a table with all flushes, sorted by start date (newest first)
Table Columns
Section titled “Table Columns”| Column | Description |
|---|---|
| Name | Flush name |
| Planting | Which planting this flush belongs to |
| Room | Room where this flush occurred |
| Flush Number | The sequence number (1, 2, or 3) |
| Start Date | First harvest date for this flush |
| End Date | Last harvest date for this flush |
| Created at | When this flush was created |
Sorting and Filtering
Section titled “Sorting and Filtering”- Click any column header to sort by that column
- Use the Active filter to show only active flushes (no end date) or completed flushes
- Use the Deleted records filter to show archived flushes
Understanding Flush Numbers
Section titled “Understanding Flush Numbers”Flushes are numbered sequentially:
- Flush 1: The first harvest cycle
- Flush 2: The second harvest cycle (occurs after Flush 1)
- Flush 3: The third harvest cycle (occurs after Flush 2)
Important Rules
Section titled “Important Rules”- Sequential Order: Flushes must be numbered 1, 2, 3 in order - you cannot skip numbers
- No Overlapping: Flush date ranges cannot overlap - Flush 2 must start after Flush 1 ends
- Continuous Dates: Each flush should have continuous dates (no gaps within a flush)
Using the Flushing Page
Section titled “Using the Flushing Page”The Flushing page is a special workflow that helps you assign flush numbers to harvest dates. You access it when closing a planting.
Accessing the Flushing Page
Section titled “Accessing the Flushing Page”Method 1: From Plantings List
- Go to Plantings in the sidebar
- Find an active planting (one without an end date)
- Click the Close button (warning icon) on the planting row
- You’ll be taken to the Flushing page for that planting
Method 2: Direct Access
The Flushing page can also be accessed directly, but you’ll need to select a room and planting using the filters.
Understanding the Flushing Page Display
Section titled “Understanding the Flushing Page Display”The Flushing page shows:
- A table with harvest dates and total weights
- Status column showing which flush each date currently belongs to (if any)
- Action buttons (Flush1, Flush2, Flush3, Clear) for each date row
Step-by-Step: Assigning Flushes
Section titled “Step-by-Step: Assigning Flushes”-
Select Room and Planting (if not already selected):
- Use the filter panel at the top
- Select the Room from the dropdown
- Select the Planting from the dropdown (only active plantings for that room appear)
- The table will update to show harvest dates for that planting
-
Review the Data:
- The table shows each harvest date with total weight harvested
- Dates are sorted chronologically
- The Status column shows if a date is already assigned to a flush
-
Assign Flush Numbers:
- For each date row, click the appropriate flush button:
- Flush1 button for first harvest cycle dates
- Flush2 button for second harvest cycle dates
- Flush3 button for third harvest cycle dates
- Clear button to remove a flush assignment
- The Current Status column will update to show your selections
- For each date row, click the appropriate flush button:
-
Review Your Selections:
- Check that flush numbers are in sequential order (1, then 2, then 3)
- Verify that date ranges don’t overlap
- Make sure all harvest dates are assigned (or intentionally left unassigned)
-
Save Changes:
- Check the boxes next to all date rows you want to save (or use Select All)
- Click the Actions dropdown
- Select Save Changes
- The system will validate your selections
Validation Rules
Section titled “Validation Rules”The system checks your flush assignments before saving:
-
Sequential Order: Flushes must be numbered 1, 2, 3 in order
- Error: “First flush must be Flush 1”
- Error: “Found Flush X but expected Flush Y. Flushes must be sequential.”
-
No Overlapping Dates: Flush date ranges cannot overlap
- Error: “Flush X starts on [date] which overlaps with Flush Y that ends on [date]”
-
Date Order: Start date must be before or equal to end date
- Error: “Flush X: Start date cannot be after end date”
If validation fails, you’ll see error messages explaining what needs to be fixed. Correct the issues and try saving again.
What Happens When You Save
Section titled “What Happens When You Save”When you successfully save flush assignments:
- Flush Records Created/Updated: The system creates new flush records or updates existing ones
- Transactions Linked: Transactions for those dates are linked to the appropriate flush
- Planting Closed: The planting’s end date is automatically set to the last flush’s end date
- Success Notification: You’ll see a confirmation message for each flush created or updated
Creating a Flush Manually
Section titled “Creating a Flush Manually”Who can do this: Super Admin, Operations Manager
You can also create flushes directly without using the Flushing page:
- Click Flushes in the sidebar
- Click the New flush button (top right)
- Fill in the form:
- Name: Enter a name (e.g., “Flush1”, “Flush2”)
- Planting: Select the planting this flush belongs to
- Room: Select the room (should match the planting’s room)
- Flush Number (Sequence): Enter 1, 2, or 3
- Start Date: First harvest date for this flush
- End Date: Last harvest date for this flush
- Click Create
When to Create Manually
Section titled “When to Create Manually”Manual creation is useful for:
- Correcting flush assignments
- Adding flushes that weren’t created through the Flushing page
- Making adjustments after initial setup
Viewing a Single Flush
Section titled “Viewing a Single Flush”- From the Flushes list, click the eye icon (View) on any row
- You’ll see all flush details including the associated planting and room
Editing a Flush
Section titled “Editing a Flush”Who can do this: Super Admin, Operations Manager
- From the Flushes list, click the pencil icon (Edit) on any row
- Modify the fields as needed
- Click Save
Editing Flush Dates
Section titled “Editing Flush Dates”When you change flush dates:
- Transactions within the new date range will be linked to this flush
- Transactions outside the new date range may lose their flush assignment
- Be careful when editing dates on flushes that already have transactions
Changing Flush Number
Section titled “Changing Flush Number”You can change the flush number (sequence), but be aware:
- This may affect the sequential order validation
- Other flushes for the same planting may need adjustment
- Consider using the Flushing page workflow instead for major changes
Deleting a Flush
Section titled “Deleting a Flush”Who can do this: Super Admin, Operations Manager
- From the Flushes list, click the Edit button
- Click the Delete button
- Confirm the deletion when prompted
Warning
Section titled “Warning”Deleting a flush will:
- Remove the flush record
- Transactions linked to this flush will lose their flush assignment
- The flush number will be available for reassignment
- You can restore deleted flushes using the “Deleted records” filter
Viewing Flushes for a Planting
Section titled “Viewing Flushes for a Planting”From the Planting View Page
Section titled “From the Planting View Page”- Open a planting record (click the eye icon in Plantings)
- Scroll to the Flushes panel
- You’ll see all flushes for this planting
- You can create, edit, or delete flushes from here
From the Flushes Section
Section titled “From the Flushes Section”- Click Flushes in the sidebar
- The table shows all flushes with their associated plantings
- You can sort or filter to find specific plantings
Common Workflows
Section titled “Common Workflows”Closing a Planting with Flushes
Section titled “Closing a Planting with Flushes”- Ensure all harvest dates have transactions recorded
- Go to Plantings and find the active planting
- Click the Close button
- On the Flushing page:
- Review the harvest dates and weights
- Assign Flush1 to the first harvest period
- Assign Flush2 to the second harvest period (after Flush1 ends)
- Assign Flush3 to the third harvest period (after Flush2 ends)
- Select all date rows
- Click Actions → Save Changes
- The planting is automatically closed
Correcting Flush Assignments
Section titled “Correcting Flush Assignments”If you need to fix flush assignments:
- Go to Flushes in the sidebar
- Find the flush you want to correct
- Click Edit
- Adjust the dates or flush number as needed
- Click Save
Or use the Flushing page:
- Go to Plantings and open the planting
- Click Close (even if already closed, you can still access the page)
- Use the Clear button to remove incorrect assignments
- Reassign dates to the correct flushes
- Save changes
Adding a Missing Flush
Section titled “Adding a Missing Flush”If a flush wasn’t created during the initial setup:
- Go to Flushes in the sidebar
- Click New flush
- Select the planting
- Enter the flush number, name, and date range
- Click Create
Make sure the flush number follows sequential order and doesn’t overlap with existing flushes.
Troubleshooting
Section titled “Troubleshooting”Cannot Access Flushing Page
Section titled “Cannot Access Flushing Page”- Make sure you have permission to manage flushes (Super Admin or Operations Manager)
- The planting must exist and be active (no end date) to use the Close button
- Contact your administrator if you need access
Validation Errors When Saving
Section titled “Validation Errors When Saving”Common validation errors and solutions:
“First flush must be Flush 1”
- Make sure you start with Flush1, not Flush2 or Flush3
- Clear all assignments and start over with Flush1
“Flushes must be sequential”
- You cannot skip numbers (e.g., Flush1 then Flush3)
- Assign Flush1, then Flush2, then Flush3 in order
“Flush X overlaps with Flush Y”
- Flush date ranges cannot overlap
- Make sure Flush2 starts after Flush1 ends
- Make sure Flush3 starts after Flush2 ends
“Start date cannot be after end date”
- For each flush, the start date must be before or equal to the end date
- Check your date assignments
Dates Not Showing in Flushing Page
Section titled “Dates Not Showing in Flushing Page”- Make sure transactions exist for the planting’s room and date range
- Check that the planting’s start date is before the transaction dates
- Verify the room and planting are correctly selected in the filters
Cannot Create Flush
Section titled “Cannot Create Flush”Only Super Admins and Operations Managers can create flushes. Contact your administrator if you need this access.
Flush Not Appearing for Planting
Section titled “Flush Not Appearing for Planting”- Check that the flush is linked to the correct planting
- Use the Flushes section and filter by planting
- Verify the flush hasn’t been deleted (use “Deleted records” filter)
Transactions Not Linked to Flush
Section titled “Transactions Not Linked to Flush”- Transactions are automatically linked when you save flush assignments on the Flushing page
- If transactions aren’t linked, verify the transaction dates fall within the flush’s date range
- You may need to adjust flush dates to include the transaction dates
Planting Not Closing Automatically
Section titled “Planting Not Closing Automatically”- The planting closes automatically when you save flush assignments on the Flushing page
- The end date is set to the last flush’s end date
- If the planting didn’t close, check that flushes were successfully saved
- You can manually set an end date on the planting if needed