Skip to content

include filter working with portfolios and programs#22998

Open
ulferts wants to merge 1 commit intorelease/17.4from
bug/74536-errors-with-include-project-work-package-list-filter-with-a-portfolio
Open

include filter working with portfolios and programs#22998
ulferts wants to merge 1 commit intorelease/17.4from
bug/74536-errors-with-include-project-work-package-list-filter-with-a-portfolio

Conversation

@ulferts
Copy link
Copy Markdown
Contributor

@ulferts ulferts commented Apr 29, 2026

Ticket

https://community.openproject.org/wp/74536

What are you trying to accomplish?

Fix include projects with when portfolios and programs are involved

  • included portfolios and programs are checked
  • the current project is correctly identified by include project on hovering
  • creation of work packages after using include projects is applied happens in the intended project

The fixes in here try to strike a balance between fixing the bugs with limited effort and avoiding to worsen code quality. But the tendency here is minimize the effort meaning code quality is not the best in this PR.

Ideally:

  • The hack in work-package-filter-values would be avoided.
  • The strategy pattern started for the api v3 path helper would be extended to place all non default mappings (paths, property names from/to API/AR, ...) in the same place grouped by object type.

Merge checklist

  • Added/updated tests

@ulferts ulferts force-pushed the bug/74536-errors-with-include-project-work-package-list-filter-with-a-portfolio branch from b2e1997 to bd4761e Compare April 29, 2026 16:52
@ulferts ulferts force-pushed the bug/74536-errors-with-include-project-work-package-list-filter-with-a-portfolio branch from bd4761e to 222639f Compare April 30, 2026 08:18
return ((resource instanceof HalResource) ? resource.href : resource) === this.currentProject.apiv3Path;
const href = (resource instanceof HalResource) ? resource.href : resource;
const hrefParts = href?.split('/');
return hrefParts?.[hrefParts.length - 1] === currentProjectId;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is the option of moving this into the CurrentProjectService so that other callers can profit from it. Currently though, this was the only place I could find.

The other use case within this PR is different in that it actually needs the api href rather than just knowing if it is the current workspace.

@ulferts ulferts marked this pull request as ready for review April 30, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant