Skip to content

Commit 717b17c

Browse files
spaceisntsyntaxgmcharlt
authored andcommitted
LP#2110908: Repair SR clone/edit special case
We handle org_unit-type columns specially in the reporter, because there's a bunch of implicit logic regarding hierarchy and widgets. Due to that, we need to be careful when loading a saved template that we have not already performed a particular internal transformation on the data we are about to store. This commit checks for that and avoids doubling the special-case encoding for filters on these columns. Release-note: Fix Simple Report cloning and editing when using a filter on an organizational unit Signed-off-by: Mike Rylander <[email protected]> Signed-off-by: Galen Charlton <[email protected]>
1 parent 20ba986 commit 717b17c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Open-ILS/src/eg2/src/app/staff/reporter/share/reporter.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ export class ReporterService {
11901190
templ.filterFields.forEach((el, idx) => {
11911191
if (isSimple || !el.with_value_input) {
11921192
rrData[el.filter_placeholder] = el.force_filtervalues ? el.force_filtervalues : el.filter_value;
1193-
if (el.datatype === 'org_unit' && el.operator.name === '= any') { // special case for org selector
1193+
if (typeof rrData[el.filter_placeholder] === 'string' && el.datatype === 'org_unit' && el.operator.name === '= any') { // special case for org selector
11941194
const final_value = { transform: 'Bare', params: rrData[el.filter_placeholder] };
11951195
final_value['_org_family_primaryOrgId'] = el._org_family_primaryOrgId;
11961196
final_value['_org_family_includeAncestors'] = el._org_family_includeAncestors;

0 commit comments

Comments
 (0)