User Story:
As a Garden Manager, I want the system to calculate the capacity of my garden, so I can understand how full my garden is.
Acceptance Criteria:
- "Capacity" (CAMPX__Capacity__c) should be calculated whenever the "Total Plant Count" (CAMPX__Total_Plant_Count__c) or "Maximum Plant Count" (CAMPX__Max_Plant_Count__c) change
- The formula is:
(Total Plant Count / Maximum Plant Count) × 100
- When Maximum Plant Count or Total Plant Count is zero or blank, the Capacity should be zero
Example Scenario:
- The Rose Garden has a Total Plant Count of 50 and a Maximum Plant Count of 100. Capacity is 50%. A new rose bush was added to the Rose Garden and increased the Total Plant Count to 51. The capacity is now 51%.
- The Greenhouse Garden has a Total Plant Count of 2 and a Maximum Plant Count of 100. Capacity is 2%. One of the plants is removed, and the Total Plant Count drops to 1. The capacity is now 1%.
- The Spring Garden has a Total Plant Count of 100 and a Maximum Plant Count of 100. Capacity is at 100%. The Maximum Plant Count increased to 120. The Capacity is now at 83.33%.