From c72f8784a59a25793a88d1c28b32a36d72c7d586 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 1 Dec 2021 14:30:38 +0100 Subject: [PATCH] ui: group filter: merge duplicate filters Signed-off-by: Thomas Lamprecht --- www/window/SyncJobEdit.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js index 8abfacf7..1cb2eca1 100644 --- a/www/window/SyncJobEdit.js +++ b/www/window/SyncJobEdit.js @@ -243,9 +243,14 @@ Ext.define('PBS.window.SyncJobEdit', { xtype: 'inputpanel', onGetValues: function(values) { PBS.Utils.delete_if_default(values, 'group-filter'); - if (Ext.isArray(values['group-filter']) && values['group-filter'].length === 0) { - delete values['group-filter']; - values.delete = 'group-filter'; + if (Ext.isArray(values['group-filter'])) { + if (values['group-filter'].length === 0) { + delete values['group-filter']; + values.delete = 'group-filter'; + } else { + // merge duplicates + values['group-filter'] = [...new Set(values['group-filter'])]; + } } return values; },