Skip to content

Use localstorage to remember swimlane state for boards

What does this MR do and why?

This MR does two things:

  1. Prevent group_by=epic from persisting when switching boards
  2. Use LocalStorage to remember whether the user has swimlanes turned on for a board and show them again when visiting that board

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Check out this branch locally
  2. Visit a project issue board. If the project only has one board, create another one so that you can switch between boards.
  3. Turn epic swimlanes on for the board
    • EXPECTED: group_by=epic will be added to the URL and epic swimlanes will turn on
  4. Switch to another board
    • EXPECTED: group_by=epic should not persist in the URL and epic swimlanes should not be on for this board
  5. Switch back to the first board you were visiting
    • EXPECTED: group_by=epic should be in the URL and epic swimlanes should be on
  6. Turn epic swimlanes off
    • EXPECTED: group_by=epic will be removed from the URL and epic swimlanes will be turned off
  7. Switch to the other board you visited in step 4
    • EXPECTED: group_by=epic should not be in the URL and epic swimlanes should not be on for this board
  8. Switch back to the original board again
    • EXPECTED: group_by=epic will not be in the URL and epic swimlanes will be turned off
  9. Manually add group_by=epic to the URL and hit Enter to visit the resulting URL
    • EXPECTED: the group_by=epic parameter remains in the URL and epic swimlanes turn on
  10. Manually remove group_by=epic from the URL and hit Enter to visit the resulting URL
    • EXPECTED: the group_by=epic parameter is not part of the URL and epic swimlanes are off
  11. Visit a group issue board. If the group only has one board, create another one so that you can switch between boards.
  12. repeat steps 3-10 for group issue boards
    • EXPECTED: for each step, the group issue board will behave identically to the project issue board
  13. Visit a group epic board
  14. Open the view options dropdown
    • EXPECTED: The "Epic swimlanes" toggle will not be present on this board
  15. Manually add group_by=epic to the URL and hit Enter to visit the resulting URL
    • EXPECTED: the group_by=epic parameter will be removed from the URL. Nothing will change about the board. (Epic boards do not have epic swimlanes functionality)

Related to #457555 (closed), #452225

Edited by Chad Lavimoniere

Merge request reports