Add active/inactive status to properties #9

Closed
opened 2026-05-25 01:45:22 +00:00 by ldraney · 1 comment
Owner

Type

Feature

Lineage

Child of ldraney/landscaping-assistant #8. Phase 1 of weekly tracking decomposition.

Repo

ldraney/landscaping-assistant

User Story

As a landscaper
I want to mark properties as active or inactive
So that houses I no longer service don't clutter my daily queue

Context

Foundation for weekly tracking (#8). Adds the active boolean to properties, the model scope, and filters inactive properties from the Today queue's "All Properties" list. No new views — just schema + filtering.

File Targets

Files to modify or create:

  • db/migrate/xxx_add_active_to_properties.rb — add active boolean (default: true, null: false)
  • app/models/property.rb — add scope :active
  • app/controllers/work_queue_items_controller.rb — filter @properties to active only
  • app/controllers/properties_controller.rb — ensure new properties default to active

Files NOT to touch:

  • app/views/layouts/application.html.erb — nav changes are in a later issue
  • app/javascript/controllers/ — no JS changes needed

Acceptance Criteria

  • active column exists on properties, defaults to true
  • Property.active scope returns only active properties
  • Today queue "All Properties" list only shows active properties
  • Existing properties all default to active after migration

Test Expectations

  • Model spec: Property.active scope excludes inactive
  • Request spec: inactive properties don't appear in /today property list
  • Run command: bundle exec rspec

Constraints

  • No new views or navigation changes in this issue
  • Migration must be reversible
  • Match existing model/spec patterns

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-landscaping-assistant
  • Parent: #8
### Type Feature ### Lineage Child of `ldraney/landscaping-assistant #8`. Phase 1 of weekly tracking decomposition. ### Repo `ldraney/landscaping-assistant` ### User Story As a landscaper I want to mark properties as active or inactive So that houses I no longer service don't clutter my daily queue ### Context Foundation for weekly tracking (#8). Adds the `active` boolean to properties, the model scope, and filters inactive properties from the Today queue's "All Properties" list. No new views — just schema + filtering. ### File Targets Files to modify or create: - `db/migrate/xxx_add_active_to_properties.rb` — add `active` boolean (default: true, null: false) - `app/models/property.rb` — add `scope :active` - `app/controllers/work_queue_items_controller.rb` — filter `@properties` to active only - `app/controllers/properties_controller.rb` — ensure new properties default to active Files NOT to touch: - `app/views/layouts/application.html.erb` — nav changes are in a later issue - `app/javascript/controllers/` — no JS changes needed ### Acceptance Criteria - [ ] `active` column exists on properties, defaults to true - [ ] `Property.active` scope returns only active properties - [ ] Today queue "All Properties" list only shows active properties - [ ] Existing properties all default to active after migration ### Test Expectations - [ ] Model spec: `Property.active` scope excludes inactive - [ ] Request spec: inactive properties don't appear in /today property list - Run command: `bundle exec rspec` ### Constraints - No new views or navigation changes in this issue - Migration must be reversible - Match existing model/spec patterns ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-landscaping-assistant` - Parent: #8
Author
Owner

Scope Review: READY

Review note: review-1251-2026-05-24

Ticket is well-scoped: all 4 file targets verified in codebase, template is complete, traceability triangle intact (story note + arch note both confirmed). Single-repo change, 4 AC, estimated under 5 minutes of agent work. No decomposition needed. Ready to move to next_up.

## Scope Review: READY Review note: `review-1251-2026-05-24` Ticket is well-scoped: all 4 file targets verified in codebase, template is complete, traceability triangle intact (story note + arch note both confirmed). Single-repo change, 4 AC, estimated under 5 minutes of agent work. No decomposition needed. Ready to move to next_up.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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
ldraney/landscaping-assistant#9
No description provided.