To ensure the accuracy of ovulation tracking, we need to implement a check to prevent users from entering multiple ovulation events within the same cycle. If an ovulation event is already recorded for a cycle, the app should notify the user and prevent the addition of a new ovulation event for that cycle.
Requirements
Ovulation Check: When a user attempts to add a new ovulation, the app should verify whether an ovulation event already exists for the current cycle.
Notification: If an ovulation already exists for the cycle, display a toast message saying "Ovulation already exists for this cycle" and do not add the new ovulation event.
User Action: Instruct users to remove the existing ovulation from the calendar before adding a new ovulation for the same cycle.
Steps to Implement
Check Existing Ovulation: Before adding a new ovulation event, query the database to check if there is already an ovulation recorded for the same cycle.
Display Notification: If an existing ovulation is found for the cycle, show a toast message with the text "Ovulation already exists for this cycle".
Prevent Addition: Do not proceed with adding the new ovulation event if an existing ovulation is found for the cycle.
User Instructions: Provide instructions to users indicating that they need to remove the existing ovulation from the calendar before adding a new one.
Acceptance Criteria
The system accurately checks for existing ovulations in the current cycle before allowing the addition of a new one.
Users receive a clear toast message when attempting to add an ovulation where one already exists.
Users are informed of the need to remove the existing ovulation before adding a new one.
Additional Notes
Ensure that the toast message is clear and visible to the user.
Implement appropriate error handling to manage scenarios where the database check fails.
Test the feature to confirm that it correctly prevents multiple ovulation entries within the same cycle and provides the correct user feedback.
Please provide feedback or additional suggestions on the implementation of this feature.
Title
Prevent Multiple Ovulations in the Same Cycle
Description
To ensure the accuracy of ovulation tracking, we need to implement a check to prevent users from entering multiple ovulation events within the same cycle. If an ovulation event is already recorded for a cycle, the app should notify the user and prevent the addition of a new ovulation event for that cycle.
Requirements
Steps to Implement
Acceptance Criteria
Additional Notes
Please provide feedback or additional suggestions on the implementation of this feature.