Make location/address optional when adding properties #26

Closed
opened 2026-05-25 03:35:46 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — discovered during daily workflow usage.

Repo

ldraney/landscaping-assistant

User Story

As a landscaper
I want to add properties by name without requiring an address
So that I can quickly save names my boss gives me at the start of the day and add locations later when I arrive

Context

The boss gives property names at the beginning of the day that need to go into the queue immediately. These may not have addresses yet — the landscaper adds the address when they arrive on site. Currently address_line has validates :address_line, presence: true which blocks saving without a location. The Today page is the primary entry point for adding new properties to the daily queue.

File Targets

Files the agent should modify or create:

  • app/models/property.rb — remove validates :address_line, presence: true
  • app/views/properties/show.html.erb — handle nil address display gracefully
  • app/views/properties/edit.html.erb — ensure address field is editable (add/update)
  • Today page view — confirm no frontend required attribute on address input
  • Map/GPS related views — degrade gracefully when no address is set

Files the agent should NOT touch:

  • Migration files — no schema change needed, column already allows null

Acceptance Criteria

  • Can add a property with just a name (no address) from the Today page
  • Property appears in queue without an address
  • Can navigate to property details and add/update the address later
  • Map/GPS features degrade gracefully when no address is set (no crash, no blank map errors)
  • Existing properties with addresses are unaffected

Test Expectations

  • Model test: property saves successfully with name only, no address
  • Model test: property still saves with both name and address
  • Integration test: creating a property without address from Today page succeeds
  • Integration test: editing a property to add an address works
  • Run command: bin/rails test

Constraints

  • Keep existing address functionality intact for properties that have one
  • No Tailwind
  • Follow existing form patterns in the app

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • landscaping-assistant — project this affects
### Type Feature ### Lineage Standalone — discovered during daily workflow usage. ### Repo `ldraney/landscaping-assistant` ### User Story As a landscaper I want to add properties by name without requiring an address So that I can quickly save names my boss gives me at the start of the day and add locations later when I arrive ### Context The boss gives property names at the beginning of the day that need to go into the queue immediately. These may not have addresses yet — the landscaper adds the address when they arrive on site. Currently `address_line` has `validates :address_line, presence: true` which blocks saving without a location. The Today page is the primary entry point for adding new properties to the daily queue. ### File Targets Files the agent should modify or create: - `app/models/property.rb` — remove `validates :address_line, presence: true` - `app/views/properties/show.html.erb` — handle nil address display gracefully - `app/views/properties/edit.html.erb` — ensure address field is editable (add/update) - Today page view — confirm no frontend `required` attribute on address input - Map/GPS related views — degrade gracefully when no address is set Files the agent should NOT touch: - Migration files — no schema change needed, column already allows null ### Acceptance Criteria - [ ] Can add a property with just a name (no address) from the Today page - [ ] Property appears in queue without an address - [ ] Can navigate to property details and add/update the address later - [ ] Map/GPS features degrade gracefully when no address is set (no crash, no blank map errors) - [ ] Existing properties with addresses are unaffected ### Test Expectations - [ ] Model test: property saves successfully with name only, no address - [ ] Model test: property still saves with both name and address - [ ] Integration test: creating a property without address from Today page succeeds - [ ] Integration test: editing a property to add an address works - Run command: `bin/rails test` ### Constraints - Keep existing address functionality intact for properties that have one - No Tailwind - Follow existing form patterns in the app ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `landscaping-assistant` — project this affects
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#26
No description provided.