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

Attempt to improve var names

Kabiru Mwenjaac5b0eb2f6a0
diff --git a/frontend/src/app/core/path-helper/apiv3-paths.ts b/frontend/src/app/core/path-helper/apiv3-paths.ts
index 3bf3efbba48..2c21c1ac787 100644
--- a/frontend/src/app/core/path-helper/apiv3-paths.ts
+++ b/frontend/src/app/core/path-helper/apiv3-paths.ts
@@ -46,13 +46,12 @@ export class ApiV3Paths {
// that are members of that project:
filters.add('member', '=', [(workPackage.project as HalResource).id as string]);
} else {
- const isRestrictedAttribute = 'data-work-packages--activities-tab--restricted-comment-is-restricted-value';
- const addCommentIsRestricted = document.getElementById('work-packages-activities-tab-add-comment-component')?.getAttribute(isRestrictedAttribute) === 'true';
- const editorIsRestricted = document.querySelector('.work-packages-activities-tab-journals-item-component-edit')?.getAttribute(isRestrictedAttribute) === 'true';
- const isRestricted = addCommentIsRestricted || editorIsRestricted;
+ const isRestrictedAttributeValue = 'data-work-packages--activities-tab--restricted-comment-is-restricted-value';
+ const addingCommentIsRestricted = document.getElementById('work-packages-activities-tab-add-comment-component')?.getAttribute(isRestrictedAttributeValue) === 'true';
+ const editingCommentIsRestricted = document.querySelector('.work-packages-activities-tab-journals-item-component-edit')?.getAttribute(isRestrictedAttributeValue) === 'true';
// that are mentionable on the work package
- if (isRestricted) {
+ if (addingCommentIsRestricted || editingCommentIsRestricted) {
filters.add('restricted_mentionable_on_work_package', '=', [workPackage.id.toString()]);
} else {
filters.add('mentionable_on_work_package', '=', [workPackage.id.toString()]);