From f344b72583e7865d30a3767e5e8ab31787819a99 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Tue, 6 Jun 2023 12:43:27 +0200 Subject: [PATCH] Fix save and load of folder checkbox in filters [SCI-8598] --- app/assets/javascripts/projects/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 661cabe70..cc6762ecc 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -577,7 +577,7 @@ var ProjectsIndex = (function() { createdOnFromFilter: selectDate($createdOnFromFilter), createdOnToFilter: selectDate($createdOnToFilter), membersFilter: dropdownSelector.getData($('.members-filter')), - lookInsideFolders: $foldersCB.prop('checked') ? 'true' : '', + lookInsideFolders: !!$foldersCB.prop('checked'), archivedOnFromFilter: selectDate($archivedOnFromFilter), archivedOnToFilter: selectDate($archivedOnToFilter), projectsViewSearch: $textFilter.val() @@ -589,7 +589,7 @@ var ProjectsIndex = (function() { $createdOnFromFilter.val(currentFilters.createdOnFromFilter); $createdOnToFilter.val(currentFilters.createdOnToFilter); - $foldersCB.val(currentFilters.lookInsideFolders); + $foldersCB.attr('checked', currentFilters.lookInsideFolders); dropdownSelector.setData($('.members-filter'), currentFilters.membersFilter); $archivedOnFromFilter.val(currentFilters.archivedOnFromFilter); $archivedOnToFilter.val(currentFilters.archivedOnToFilter);