-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
bugDefect affecting the currently released version of WaltzDefect affecting the currently released version of Waltzfixed (test & close)An issue has been fixed, merged into master and is ready for further testingAn issue has been fixed, merged into master and is ready for further testing
Milestone
Description
Description
Noticed that if an adopter uses custom flow classification values, with custom codes, the boingy graph fails to render a colour and defaults to "NO_OPINION" hence always grey. See below, expect to see two green lines.
The database has the follow classifications:
I have traced the issue to the logical-flow-utility.pickWorst function. The issue is the hardcode:
function pickWorst(ratings = []) {
const sortedByBadness = [ "DISCOURAGED", "SECONDARY", "PRIMARY", "NO_OPINION" ];
const worst = _.find(sortedByBadness, x => _.includes(ratings, x));
console.log("pick worst: ", {ratings, worst})
return worst || "NO_OPINION";
}
replacing as follows fixed the issue for this specific data
const sortedByBadness = [ "DISCOURAGED", "NOT_PERMITTED", "SECONDARY_SOURCE", "DATA_ENTRY_POINT", "PRIMARY_SOURCE", "NO_OPINION", "NO_OPINION_TARGET" ];
So the pickWorst function needs to accomodate custom codes.
Waltz Version
1.79
Steps to Reproduce
...
Expected Result
No response
Actual Result
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugDefect affecting the currently released version of WaltzDefect affecting the currently released version of Waltzfixed (test & close)An issue has been fixed, merged into master and is ready for further testingAn issue has been fixed, merged into master and is ready for further testing