diff --git a/config/DO_Dashboard_Config.xlsx b/config/DO_Dashboard_Config.xlsx index 6f2632d..e473fbd 100644 Binary files a/config/DO_Dashboard_Config.xlsx and b/config/DO_Dashboard_Config.xlsx differ diff --git a/do_dashboard.py b/do_dashboard.py index f39542d..9869fd8 100644 --- a/do_dashboard.py +++ b/do_dashboard.py @@ -843,6 +843,33 @@ def _execute_custom_function(function_name, args, output_request): return "undefined" + elif function_name == "concat": + # Args: [separator, field_name_1, field_name_2, ..., field_name_n] + # separator : string to insert between concatenated values + # field_name_* : names of already-computed fields in output_request to concatenate + # undefined/None values are silently skipped + if not args or len(args) < 2: + return "$$$$ Argument Error: concat requires at least 2 arguments (separator + 1 field)" + + separator = args[0] + if not isinstance(separator, str): + return "$$$$ Argument Error: concat separator (arg1) must be a string" + + field_names = args[1:] + parts = [] + all_undefined = True + + for field_name in field_names: + value = get_value_from_request(output_request, field_name) + if value is not None and value != "undefined": + all_undefined = False + parts.append(str(value)) + + if all_undefined: + return "undefined" + + return separator.join(parts) + return f"$$$$ Unknown Custom Function: {function_name}" diff --git a/do_dashboard_quality_checks.py b/do_dashboard_quality_checks.py index 62227b3..4537ac1 100644 --- a/do_dashboard_quality_checks.py +++ b/do_dashboard_quality_checks.py @@ -674,15 +674,15 @@ def non_regression_check(output_requests, old_requests_filename): checked_fields = [(f[0], f[1], f[2], f[3]) for f in all_fields_list if f[4]] - inclusion_matches = False + request_matches = False if bloc_scope == "all": if len(changed_fields) > 0 and len(checked_fields) == len(changed_fields): - inclusion_matches = True + request_matches = True else: # bloc_scope == "any" if len(checked_fields) > 0: - inclusion_matches = True + request_matches = True - if inclusion_matches: + if request_matches: matching_requests_count += 1 if debug_mode and checked_fields: field_changes = [(f"{gn}.{fn}", ov, nv) for gn, fn, ov, nv in checked_fields]