Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ensure "toggle all" checkbox is unchecked when no filter results return

Aaron Contreras7c5999e9389c
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/share/bulk-selection.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/share/bulk-selection.controller.ts
index 3f0199909a6..f6d119154bc 100644
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/share/bulk-selection.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/share/bulk-selection.controller.ts
@@ -125,7 +125,11 @@ export default class BulkSelectionController extends Controller {
refresh() {
const checkedSharesCount = this.checked.length;
const sharesCount = this.shareCheckboxTargets.length;
- this.toggleAllTarget.checked = checkedSharesCount === sharesCount;
+ if (sharesCount === 0) {
+ this.toggleAllTarget.checked = false;
+ } else {
+ this.toggleAllTarget.checked = checkedSharesCount === sharesCount;
+ }
if (this.checked.length === 0) {
this.bulkActionsTarget.setAttribute('hidden', 'true');