Analyses sorted by priority in Add Analyses view and preserve AR order when adding into Worksheet #338
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #303
IMPORTANT: Requires the execution of upgrade step v1.1.1
In Analyses Add View (when creating a Worksheet), the analyses were displayed randomly. After their selection (and addition into a new Worksheet), the position of the Analysis Requests in the Worksheet was the same as the Analyses Add view, random.
With this Pull Request, the Analyses in Add Analyses view are sorted by priority by default (from more priority to less priority), at the same time that preserves the correct order of analyses in accordance with the SortKey value as defined in the Analysis Service (#331):
When selected and submitted, the order of the Analysis Requests inside the Worksheet is corrected, so the ARs are sorted in natural order of creation, but again, keeping the Analyses' SortKey order:
Note the priority of AP-0010-R01 was "High" and the priority of "AP-0005-R01" was medium, so:
a) In Add Analyses view, AP-0010-R01 is displayed before AP-0005-R01
b) In Worksheet manage results, AP-0010-R01 is displayed after AP-0005-R01
c) In both cases, analyses are sorted in accordance with their SortKey value (Iron = 20, Calcium = 50, Magnesium = 70, Copper and others = Not defined)