Skip to content

Commit

Permalink
Issue 47934: Study merge participants UI not handling case difference…
Browse files Browse the repository at this point in the history
…s in dataset name (#4444)

* Add lowercase matching of query name and dataset name
* Update error message to display in UI
  • Loading branch information
labkey-martyp authored May 20, 2023
1 parent f86eca4 commit eed4ab4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions study/src/org/labkey/study/view/mergeParticipants.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,15 @@
table = Object.values(this.tables).find(v => v.label === data.queryName);
}
if (!table) {
console.error("Dataset: " + tableName + " not found.");
return;
var caseInsensitiveName = Object.keys(this.tables).find(k => k.toLowerCase() === data.queryName.toLowerCase());
if (caseInsensitiveName) {
table = this.tables[caseInsensitiveName];
}
}
if (!table) {
fatalError = true;
updateMergeResults("Error: Dataset " + tableName + " not found.", true);
console.error("Dataset: " + tableName + " not found. Returned queryName: " + data.queryName);
}
gatherIds(table, data.rows, checkTable.oldId, checkTable.newId);
Expand Down

0 comments on commit eed4ab4

Please sign in to comment.