bcgov / foi-flow

Freedom of Information modernization
Apache License 2.0
5 stars 3 forks source link

Filter by Consultee #4133

Closed KyEggleston closed 1 year ago

KyEggleston commented 1 year ago

Assumptions & Scope This story is to allow users to filter the package by specific consultees (i.e., the ones selected when applying the 'Consult' page flag). Rather than just selecting the 'Consult' page flag filter, and displaying all pages flagged with the 'Consult' page flag (and potentially numerous different consultees), users want the ability to filter by specific consultees that have been applied in the package.

For example, in the image below, rather than only being able to filter by the 'Consult' page flag itself, you should instead be able to filter by the specific consultees under the 'Consult' page flag. In this example, the design here would show AED, EMC and HSG as options to select under the 'Consult' page flag filter. Users will also have the ability to select all consultees, and unselect all consultees, from within the 'Consult' page flag filter dropdown.

image

Only consultees that have been selected/added when applying the 'Consult' page flag should be available under the 'Consult' page flag filter.

Users should be able to select one or more consultees under the 'Consult' page flag filter.

When a consultee is removed from all 'Consult' page flags used in the package, they should no longer appear under the 'Consult' page flag filter.

This should work with the other filter criteria available (e.g., page flag filter, Organize By and Filter Records), combining to produce a broader, or more specific, search.

What is IN scope?

Updating the filter options in the navigation (left) pane to also include consultees as filter options

What is NOT in scope?

Creating, saving or downloading a consult package Creating a consult layer

Acceptance Criteria

Scenario 1: Consult Flag Filter - No Consultees

Scenario 2: Consult Flag Filter - 1 or more Consult Page Flags

Scenario 3: Select One Consultee

Scenario 4: Select Two or More Consultees

Scenario 5: Remove 'Consult' Page Flag Filter Consultees

Scenario 6: Update / Remove Consultees from Filter

Scenario 7: Combine Page Flag Filters

Scenario 8: Select All Consultees

Scenario 9: Unselect All Consultees

Dependencies? What is the impact of this dependency? (If so, link dependency in the ticket, make it visible in a team´s backlog)

Blocked by #4221

Validation Rules? (If yes, list here)

Design https://jacklyn808742.invisionapp.com/console/share/8QVPHCNXSGA/975452421

Definition of Ready

  1. [ ] Is there a well articulated User Story?
  2. [ ] Is there Acceptance Criteria that covers all scenarios (happy/sad paths)?
  3. [ ] If there is a user interface, is there a design?
  4. [ ] Does the user story need user research/validation?
  5. [ ] Does this User Story needs stakeholder approval?
  6. [ ] Design / Solution accepted by Product Owner
  7. [ ] Is this user story small enough to be completed in a Sprint? Should it be split?
  8. [ ] Are the dependencies known/ understood? (technical, business, regulatory/policy)
  9. [ ] Has the story been estimated?

Definition of Done

  1. [ ] Passes developer unit tests
  2. [ ] Passes peer code review
  3. [ ] If there's a user interface, passes UX assurance
  4. [ ] Passes QA of Acceptance Criteria with verification in Dev and Test
  5. [ ] Confirm Test cases built and succeeding
  6. [ ] No regression test failures
  7. [ ] Test coverage acceptable by Product Owner
  8. [ ] Ticket ready to be merged to master or story branch
  9. [ ] Developer to list Config changes/ Update documents and designs
  10. [ ] Can be demoed in Sprint Review
  11. [ ] Tagged as part of a Release
  12. [ ] Feature flagged if required
  13. [ ] Change Management activities done?
KyEggleston commented 1 year ago

@JHarrietha-AOT - here is the ticket for filtering down the package by consultee, and design can be added to it

KyEggleston commented 1 year ago

@m-prodan @lmullane @liseandtea @JHarrietha-AOT - updated based on designs, but will finish tomorrow morning - may need to confirm a few details

KyEggleston commented 1 year ago

Do we need a story to allow users to select all consults? Or do we think it's sufficient for them to select them individually?

It's possible for this bug #3562 to be looked at with this ticket, as it both pertains to filtering the package?

m-prodan commented 1 year ago

I was just thinking that Kyle. re: seeing 'all' consults. Maybe we just add an option for 'All' at the bottom? Whether thats a new story, or just an AC to tack on to this one.... (being mindful of the comments in retro yesterday, of course!)

KyEggleston commented 1 year ago

Or perhaps a 'Select / Unselect All' checkbox at the top of the list? That's a common UI approach to this @JHarrietha-AOT - thoughts?

JHarrietha-AOT commented 1 year ago

@KyEggleston @m-prodan that makes sense - I would vote for a checkbox dropdown then (like watcher) and users can select whichever they need.

I can updated the design to have checkboxes after Sprint Planning - Kyle are you okay to work on updating the ticket without the designs as it is just check boxes and I can add the updated link by EOD

KyEggleston commented 1 year ago

I can update the ticket - to confirm, are we adding the 'Select / Unselect All' checkbox to the top (in designs)? Just will need to write ACs for it

JHarrietha-AOT commented 1 year ago

@KyEggleston Yes, exactly. Thanks for clarifying

KyEggleston commented 1 year ago

Updated ACs and will add design links after update

JHarrietha-AOT commented 1 year ago

@KyEggleston updated designs can be found here: https://jacklyn808742.invisionapp.com/console/share/8QVPHCNXSGA/975452421

m-prodan commented 1 year ago

Note - will have a dependency to require standardizing page numbers between left panel and PDF tron - write ticket and estimate at next SP.

KyEggleston commented 1 year ago

@aparna-aot - this looks good. One observation:

When adding a consult/consultee page flag for the first time (e.g., HSG is a consultee on Page 1), it shows up in the Consult filter dropdown once (this is correct).

image

image

However, when adding that same consultee to another page, it duplicates the consultee in the Consult filter dropdown. In this example below, I also added HSG consultee/consult page flag to Page 3. As you can see, it duplicates the consultee in the Consult filter dropdown.

image

image

This logic will continue on, for all subsequent pages flagged with the Consult page flag, with HSG as a consultee.

image image

This wasn't captured in an AC or assumptions. Here's what an AC would look like for it:

GIVEN a consultee has has been selected on one page when applying a Consult page flag AND the consultee shows up once in the Consult filter dropdown WHEN the same consultee is added to an additional page(s) when applying a Consult page flag THEN the Consult filter dropdown should still only display the consultee once AND that consultee, when filtered, will show all pages flagged with that consultee AND once all pages flagged with that consultee have the consultee removed, the consultee will no longer be displayed in the Consult filter dropdown

aparna-aot commented 1 year ago

@KyEggleston That definitely make sense. Even though the AC was not captured I have added the code for filter uniqueness. Let me quickly check the issue. Thanks for noticing that.

aparna-aot commented 1 year ago

@KyEggleston The fix is pushed to test-marshal now. You can retest it. Thanks!

KyEggleston commented 1 year ago

Thanks @aparna-aot - this works now.

One other observation - when a user creates a custom public body for consult through the open text field in the Consult modal, if the character count exceeds 17 character (including spaces), the public body name is cut off in the Consult filter dropdown.

image

I created #4277, as this UI/formatting issue also occurs in the Consultations modal itself (albeit when the public body exceeds 28 characters, including spaces).

I suppose the options are to wrap text or limit character count. Thoughts on wrapping text in Consult filter dropdown?

aparna-aot commented 1 year ago

@KyEggleston Yeah. Issue is with a single word having this much length. Multiple words are wrapped correctly. Also technically will there be a single word with such length for consult name? Also if its captured in another ticket, we can work on it and close this ticket. Private Zenhub Image

KyEggleston commented 1 year ago

@aparna-aot - thanks for checking this. Very unlikely a single word will exceed this character limit, so I think this is fine. This ticket will be closed, and I will close the other ticket as well.

KyEggleston commented 1 year ago

All ACs pass, closing.