Skip to content

feat: added values to support reordering warning trackers, and fixed …#2167

Open
AnthonyWeathers wants to merge 3 commits intodevelopmentfrom
Anthony/feature-reorder-warning-trackers
Open

feat: added values to support reordering warning trackers, and fixed …#2167
AnthonyWeathers wants to merge 3 commits intodevelopmentfrom
Anthony/feature-reorder-warning-trackers

Conversation

@AnthonyWeathers
Copy link
Copy Markdown
Contributor

feature: added ability to reorder warning trackers, and fixed warning list not displaying updated name for trackers when renamed through tracker modal

Description

Added ability to reorder the warning trackers through the modal, also fixed issue where renaming a tracker wasn't being properly reflected in the warning list for a user after clicking 'Tracking'.

Related PRS (if any):

This backend PR is related to the PR#5146 frontend PR.

Main changes explained:

  • Added warningCache to track if any of the warning trackers are outdated after a reorder/rename, so the app can be informed to re-retrieve the updated list
  • Update currentWarningsController add order value to warning trackers, made the reorder function, and call the set outdated flag function
  • Updated warningsController to retrieve the warning trackers, sorted by their order value, updates the warnings of users if the description of a warning does not match the title of the tracker but the warningId matches the tracker's id. Also, adds warningId value to user warnings that do not possess it yet.
  • Updated currentWarnings model to add the order value
  • Updated userProfile to add warningId to the warnings array

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Follow steps of frontend PR

Screenshots or videos of changes:

Note:

I made it so updateAllWarnings which would update old warnings (primarily ones made outside of this PR), only target my accounts, containing 'Anthony', I'll change it before the merge, I limited its scope to avoid updating all warnings without more testing first.

…issue for user warnings being lost when the tracker was renamed
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant