User Story:
As a GreenGuardian CRM Director, I want the system to prevent plant records from being associated with gardens in the "Permanent Closure" status, to maintain data integrity and ensure that plants are only linked to active gardens.
Acceptance Criteria:
- The system should not allow users to create a new plant record that is associated with a garden whose status is "Permanent Closure"
- The system should not allow users to update a plant record to associate it with a garden whose status is "Permanent Closure"
- The transaction should be rolled back and the user should be notified with the message: "The garden selected for this plant is permanently closed. Please select a different garden."
Example Scenarios:
- Rosewood Garden is marked as "Permanent Closure". When a user tries to create a plant in this garden, the plant creation is blocked and an error is shown: "The garden selected for this plant is permanently closed. Please select a different garden."
- A user attempts to update an existing plant record by changing its associated garden to Oak Haven Garden, not realizing that this garden's status is "Permanent Closure". The system rejects the update, reverts any changes, and notifies the user with the message: "The garden selected for this plant is permanently closed. Please select a different garden."