Detailed Use Cases Requirements - CMPUT301F17T13/cat-is-a-dog GitHub Wiki

UC 01.01 (CreateHabit)

  • Dependencies UC 04.05
  • User Story Ref US 01.01.01 US 01.06.01
  • User Interface Habit Summary Interface
  • Goal User wants to begin tracking a habit
  • Trigger User is in the "My Habits" tab and presses the floating plus button
  • Precondition
  • Postcondition Habit is added to the user's list of tracked habits
  • Basic Flow
    1. Add Habit interface opens on app
    2. User enters a title for the habit, no more than 20 characters (system will not allow more characters to be entered)
    3. User enters a reason, no more than 30 characters long (system will not allow more characters to be entered)
    4. App prompts the user to enter which days of the week the habit should occur on (MTWTFSS buttons). User selects at least one day of the week.
    5. User enters a start date for the habit, which is defaults to "now". User either changes the start date using a calendar picker or clicks "Ready to Start!"
    6. A new habit is assigned to the user and they are brought back to their habit summary page
  • Exceptions
    1. If either the title or habit schedule is empty and the user presses Ready to Go, no action occurs.
    2. If the user exits the Add Habit interface without saving, no habit is created

UC 01.02 (ViewHabit)

  • Dependencies UC 01.01 UC 04.05
  • User Story Ref US 01.03.01 US 01.08.01
  • User Interface Habit Details Interface
  • Goal User sees a detailed view of all habit information
  • Trigger User is in the "My Habits" tab and long presses on a habit item
  • Precondition User has at least one habit
  • Postcondition User can see all of one habit's details
  • Basic Flow
    1. User enters "Habit Details" interface, he/she can view the habit title, reason, start date and completion metrics over time for that habit
    2. Pressing the "Edit" button brings the user to the "Edit Habit" interface
    3. Pressing the "Delete" button deletes the habit item and returns to the "Habit Summary" interface
    4. User uses the return button to go back to the "Habit Summary" interface
  • Exceptions

UC 01.03 (EditHabit)

  • Dependencies UC 01.01 UC 04.05
  • User Story Ref US 01.04.01 US 01.06.01
  • User Interface Edit Habit Interface
  • Goal User changes the habit details
  • Trigger User is in the "Habit Details" interface and presses an "Edit Details" button
  • Precondition The habit exists
  • Postcondition
  • Basic Flow
    1. User enters "Edit Habit" interface. The title, reason, start date and schedule are editable to the user
    2. User presses the "Save Changes" button and is returned to the "Habit Details" interface for that habit
  • Exceptions
    1. If user closes the app or exits without saving, they will be brought back to the "Habit Details" interface with the habit unchanged

UC 01.04 (DeleteHabit)

  • Dependencies UC 01.01 UC 04.05
  • User Story Ref US 01.05.01
  • User Interface Habit Details Interface
  • Goal User deletes the habit from his list
  • Trigger User is in the "Habit Details" interface and presses an "Delete" button
  • Precondition The habit exists
  • Postcondition The habit is permanently deleted from their list
  • Basic Flow
    1. Upon deletion, user is brought back to the "Habit Summary" interface
  • Exceptions

UC 01.05 (GetMyHabits)

  • Dependencies UC 04.05
  • User Story Ref US 01.02.01 US 01.03.01 US 01.04.01 US 01.05.01 US 01.08.01
  • User Interface Habit Summary Interface
  • Goal User sees a summary of all their habits
  • Trigger User selects "Habit Summary" from the navigation menu, then goes to the "My Habits" tab (default)
  • Precondition
  • Postcondition User sees a summary of all their habits, with Title, Weekly Schedule and Visual Status indicated
  • Basic Flow
    1. User enters "Habit Summary" interface, which has a default tab of "My Habits"
    2. User can browse through all their habits, with the title, schedule and visual status displayed
    3. Long pressing on a habit navigates to the "View Habit" interface
  • Exceptions
    1. If user has no habits to display, a friendly message is shown instead urging the user to add their first habit

UC 01.06 (GetTodoHabits)

  • Dependencies UC 04.05
  • User Story Ref US 01.07.01
  • User Interface Habit Summary Interface
  • Goal User sees the habits due today
  • Trigger User selects "Habit Summary" from the navigation menu and then the "Todo" tab
  • Precondition User has at least one habit
  • Postcondition User sees a summary of all their habits due today, with Title, Visual Status and "Add Habit Event" button
  • Basic Flow
    1. User enters "Habit Summary" interface, "Todo" tab
    2. User can add an event for a habit due today by pressing the "Add Habit Event"
    3. User can navigate away from the interface using the navigation bar or the habit summary tabs provided
  • Exceptions

UC 01.07 (GetFollowingHabits)

  • Dependencies UC 04.05
  • User Story Ref US 05.03.01
  • User Interface Habit Summary Interface
  • Goal User sees a list of habits for participants they are granted to follow
  • Trigger User selects "Habit Summary" from the navigation menu and then the "Following" tab
  • Precondition User has at least one friend
  • Postcondition User sees a summary of all their friend's habits, with the title and visual status of each displayed
  • Basic Flow
    1. User enters "Habit Summary" interface, "Following" tab
    2. User can view their friend's habits and their respective statuses
    3. User can navigate away from the interface using the navigation bar or the habit summary tabs provided
  • Exceptions

UC 02.01 (AddHabitEvent)

  • Dependencies UC 04.05
  • User Story Ref US 02.01.01 US 02.02.01 US 02.03.01 US 02.07.01 US 06.01.01
  • User Interface Add Habit Event Interface
  • Goal User records outcome of a habit planned for this day
  • Trigger For a Habit shown to be planned for today, a user selects the "Add Habit Event" button for that Habit item
  • Precondition The habit is in the list of habits planned for today. No other habit event has been created for that habit that day.
  • Postcondition A habit event is created for that habit, for that day, and saved to storage.
  • Basic Flow
    1. Add Habit Event interface opens on app
    2. User enters an optional comment of no more than 20 characters (system will not allow more characters to be entered)
    3. User enters an optional photograph of size less than 65 536 bytes
    4. User optionally attaches their current location to the event
    5. User presses the "Save" button.
    6. App shows the newly created habit event.
  • Exceptions
    1. If the habit event has already been created for that habit that day, the app does not let the user access the Add Habit event interface.
    2. If the user closes the Add Habit event interface without saving, no new habit is added.
    3. If the photograph is larger than 65 536 bytes, the app will cancel the save operation and present an error message to the user, returning to the creation form. Possible extension: Alternatively, we can compress the image to an appropriate size instead of presenting the user with an error.
    4. If the user has not granted GPS permissions to the app and they request to attach their location, the app will prompt the user to grant the app permission
    5. If the user's GPS is disabled or not functional, present an error message to the user and return to the creation form

UC 02.02 (ViewHabitEvent)

  • Dependencies UC 02.01 UC 04.05
  • User Story Ref US 02.04.01
  • User Interface Habit Event Details Interface
  • Goal User views the details of a habit event
  • Trigger User clicks on a habit event UI element (e.g. in the habit history list)
  • Precondition The habit event exists.
  • Postcondition The habit event details remain unchanged.
  • Basic Flow
    1. View Habit Event interface is shown to the user.
    2. User closes the habit event details page.
    3. App returns to the previous page.
  • Exceptions

UC 02.03 (EditHabitEvent)

  • Dependencies UC 02.01 UC 04.05
  • User Story Ref US 02.05.01
  • User Interface Edit Habit Event Interface
  • Goal User edits the details of a habit event
  • Trigger User clicks on "Edit Habit Event" button while viewing a habit event.
  • Precondition The habit event exists.
  • Postcondition The habit event details are edited in accordance with the new data the user has submitted.
  • Basic Flow
    1. Edit Habit Event interface is shown, prepopulated with the habit event's current data.
    2. User makes edits to the fields.
    3. User presses the "Save" button.
    4. App shows the edited habit event.
  • Exceptions
    1. If the user closes the edit form without saving, no changes are made to the original habit event.

UC 02.04 (DeleteHabitEvent)

  • Dependencies UC 02.01 UC 04.05
  • User Story Ref US 02.06.01
  • User Interface Habit Event Details Interface
  • Goal User deletes a habit event
  • Trigger User clicks on "Delete Habit Event" button while viewing a habit event.
  • Precondition The habit event exists.
  • Postcondition The habit event is deleted from storage.
  • Basic Flow
    1. A "Do you wish to delete the habit event?" message is presented to the user.
    2. User confirms.
    3. App returns to the previous page.
  • Exceptions

UC 03.01 (ViewHabitHistory)

  • Dependencies UC 04.05
  • User Story Ref US 04.01.01 US 06.02.01
  • User Interface Habit History Interface
  • Goal User sees the habit events on a map and in list format.
  • Trigger User clicks on "View Habit History" button.
  • Precondition The habit events are associated with the user's habits. If a location is attached to an event, it will appear on the map
  • Postcondition The habit events are unchanged.
  • Basic Flow
    1. User views the habit event map, where geomarkers indicate the locations of your habit events
    2. User views his/her history list, sorted in reverse chronological order.
  • Exceptions

UC 03.02 (FilterHabitHistoryByUserType)

  • Dependencies UC 04.05
  • User Story Ref US 04.01.01 US 06.03.01 US 06.04.01
  • User Interface Habit History Search Interface
  • Goal User can see either only his/her own habit events, his/her friends' habit events, or both
  • Trigger User selects the "My History", "Friends", or "All" tab on the "Habit History" interface
  • Precondition The user has friends
  • Postcondition The habit history (list and map) is updated to reflect the habit events belonging to the user, his/her friends or both.
  • Basic Flow
    1. The User enters the "Habit History" interface, which has a default navigation tab of "My History". This shows all the habit events for that user
    2. If the user selects the "Friends" tab, the history will only contain the most recent event for each habit belonging to participants the user is following
    3. If the user selects the "All" tab, all the habit events for the user as well as belonging to his/her friends are displayed.
  • Exceptions

UC 03.03 (FilterHabitHistoryByHabit)

  • Dependencies UC 04.05
  • User Story Ref US 04.02.01
  • User Interface Habit History Search Interface
  • Goal User filters the habit history by the habit.
  • Trigger User presses the "Filter by Habit" button in the search interface.
  • Precondition The habits events in the list are associated to various habits.
  • Postcondition The habits history events are filtered so that only the habit events associated with a habit selected in the "Filter by Habit" page are shown
  • Basic Flow
    1. User unchecks or checks off Habits in the "Filter by Habit" page.
    2. User presses "Search"
    3. App returns to the habit history.
  • Exceptions

UC 03.04 (FilterHabitHistoryByComment)

  • Dependencies UC 04.05
  • User Story Ref US 04.03.01
  • User Interface Habit History Search Interface
  • Goal User filters the habit history by the text in the comment.
  • Trigger User presses the "Filter by Comment" button in the search interface.
  • Precondition The habits events in the list have various comments.
  • Postcondition The habit history events are filtered so that only the habit events with comments containg the text in the search bar are shown.
  • Basic Flow
    1. User types into the search bar.
    2. User presses Search.
    3. App return to the habit history.
  • Exceptions
    1. If "Search" is pressed and the search bar is empty, do not continue, and prompt user to enter text.

UC 03.05 (FilterHabitHistoryByLocation)

  • Dependencies UC 04.05
  • User Story Ref US 06.04.01
  • User Interface Habit History Search Interface
  • Goal User filters the habit history by the attached location of the event
  • Trigger User clicks the map pin in the top right corner of the map in the "Habit History" interface
  • Precondition Have GPS enabled on the phone, with proper permissions granted to the app
  • Postcondition The habit history events are filtetered such that they have a location attached that is within 5km of the user's current location
  • Basic Flow
    1. User toggles "Events Near Me" button on map
    2. Map and history list update to show only habit events that occured within 5km of the user's current location
  • Exceptions
    1. If the user has not granted GPS permissions to the app, the app will prompt the user to grant the app permission
    2. If the user's GPS is disabled or not functional, present an error message to the user and return to habit history view

UC 04.01 (ViewUsersList)

  • Dependencies UC 04.05
  • User Story Ref US 05.01.01
  • User Interface User Friends Interface
  • Goal User sees the other users who are using the application.
  • Trigger User clicks on "View Users" button.
  • Precondition The other users are identified users of the application.
  • Postcondition The other users' data is unchanged.
  • Basic Flow
    1. User views the other users.
  • Exceptions

UC 04.02 (RequestFollow)

  • Dependencies UC 04.05
  • User Story Ref US 05.01.01
  • User Interface User Search Interface
  • Goal User requests permission from another user to follow that user.
  • Trigger For a user in the View Users List, click on a "Request Follow Permission" button for a user.
  • Precondition The user exists.
  • Postcondition A follow request is created for user A to follow user B.
  • Basic Flow
    1. User creates the request to follow.
  • Exceptions
    1. If the user is already following that other user, the app tells the user that they are already following this person, and does not continue.

UC 04.04 (AcceptFollow)

  • Dependencies UC 04.05
  • User Story Ref US 05.02.01
  • User Interface User Follow Request Interface
  • Goal User accepts a request for permission to follow that user.
  • Trigger In the View Users list, if the other user has made a follow request, the request is shown in the list item. User clicks "Accept Follow Request" button.
  • Precondition Other user has sent a follow request to this user.
  • Postcondition The other user is now following this user.
  • Basic Flow
    1. User accepts the request to follow.
  • Exceptions

UC 04.05 (CreateAccount)

  • Dependencies
  • User Story Ref US 03.01.01
  • User Interface User Create Account
  • Goal User creates an account or signs in (authenticates with Google) so they can use the app
  • Trigger User launches app and is not already signed in
  • Precondition The user is not signed in
  • Postcondition The user is signed in
  • Basic Flow
    1. User chooses "Sign in with Google"
    2. Enters their credentials
  • Exceptions If the users credentials are incorrect, they will not be allowed to sign in and asked to retry following Google's standard authentication process.