Initialize Plant Fields
Not Started

User Story:
As a GreenGuardian CRM Director, I want the system to automatically initialize fields when a new plant record is created, so the data remains consistent and the record creation process is more efficient.

Default Values:

Field LabelField API NameDefault Value
Soil TypeCAMPX__Soil_Type__cAll Purpose Potting Soil
WaterCAMPX__Water__cOnce Weekly
SunlightCAMPX__Sunlight__cCopy the value from the associated garden's CAMPX__Sun_Exposure__c. If unavailable, set it to "Partial Sun".



Acceptance Criteria:

  • If the user does not specify a value for 'Soil Type' or 'Water', set it to the values in the table above
  • If the user does specify a value for 'Soil Type' or 'Water', do not default the field
  • If a plant has a garden with 'CAMPX__Sun_Exposure__c' populated, that value should be inherited, unless a user specifies their own value
  • If a plant can not inherit 'CAMPX__Sun_Exposure__c' from its garden (it's missing a garden or the garden is missing data), then "Partial Sun" should be used as the default, unless the user specifies their own value
  • This logic should only run when a plant is created, not updated