Skip to content

feat: include subproject tasks (rebase of #2272) - #2939

Open
mds08011 wants to merge 22 commits into
go-vikunja:mainfrom
mds08011:finish-subprojects
Open

feat: include subproject tasks (rebase of #2272)#2939
mds08011 wants to merge 22 commits into
go-vikunja:mainfrom
mds08011:finish-subprojects

Conversation

@mds08011

Copy link
Copy Markdown

This PR revives @JamesBatten's work from #2272 so it is ready for merge. My changes are rebasing against main, resolving conflicts, and fixing linter errors. Supersedes and closes #2272 .

@github-actions github-actions Bot added the area/projects Project CRUD, sub-projects, project tree, archiving, templates label Jun 19, 2026
@github-actions

Copy link
Copy Markdown

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-2939.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-2939 latest
https://sha-5edc7b5160fc573be25a2611754e324ad1291c0f.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-5edc7b5160fc573be25a2611754e324ad1291c0f 5edc7b5

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-2939 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-2939
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-2939

Last updated for commit 5edc7b5

@kolaente

Copy link
Copy Markdown
Member

auggie review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread pkg/models/task_collection.go Outdated
Comment thread frontend/src/components/project/views/ViewEditForm.vue Outdated
Comment thread frontend/src/components/project/views/ViewEditForm.vue Outdated
Comment thread pkg/models/project_view.go Outdated
Comment thread frontend/src/components/project/views/ProjectGantt.vue
Comment thread frontend/src/components/project/views/ProjectList.vue Outdated
Comment thread frontend/src/components/tasks/partials/SingleTaskInProject.vue Outdated
Comment thread pkg/models/project_view.go Outdated
Comment thread pkg/models/task_collection.go Outdated
@kolaente

Copy link
Copy Markdown
Member

Please take a look at the failing ci.

@kolaente

Copy link
Copy Markdown
Member

Thanks for taking the effort to rebase this! Does that mean you're also taking over the PR?

@mds08011

Copy link
Copy Markdown
Author

Thanks for taking the effort to rebase this! Does that mean you're also taking over the PR?

Hey @kolaente and @JamesBatten, the UI and syntax fixes are done, so the CI should pass. The database changes are going to stretch my abilities, but I'll dive into moving the variable to the Task Collection this weekend to give it a try.

@kolaente

Copy link
Copy Markdown
Member

Unfortunatly, CI is failing again.

Happy to assist on the DB changes.

Comment thread frontend/src/components/project/views/ViewEditForm.vue Outdated
@Mushkrem

Mushkrem commented Jul 2, 2026

Copy link
Copy Markdown

I tried building this PR myself two days ago, and after removing the duplicate line the project was built correctly, but the buttons ,,Include subprojects" were turning off milliseconds after interacting with them.

I have no knowledge of this codebase, so I tried stitching together whatever seemed to match, but there seemed to be many inconsistencies, namely in files:

  • frontend/src/modelTypes/ISavedFilter.ts (line 35) - the IFilters interface (which seems to be meant for exactly this kind of per-view filter data) has no include_subprojects field at all.
  • frontend/src/models/projectView.ts (line 18) - sets a default includeSubprojects = false at the top level instead of inside the nested filter object.
  • pkg/models/project_view.go (line 163) - Filter *TaskCollection seems to be the only place IncludeSubprojects is actually reachable from a view (Filter.IncludeSubprojects), but there's no top-level IncludeSubprojects field on ProjectView.
  • pkg/models/task_collection.go (line 35) - IncludeSubprojects is declared here as a nested field, which doesn't match how the frontend components are reading/writing it.
  • frontend/src/components/project/views/ProjectGantt.vue, FilterPopup.vue, ProjectTable.vue, ProjectList.vue, ProjectKanban.vue, ViewEditForm.vue - all read/write includeSubprojects as a top-level property instead of nested under filter.

Given all other toggleable filters append a ?query=value to the URL and this one didn't, I assumed this was supposed to be handled client-side rather than persisted to the DB, so I moved the whole thing over to work that way instead (as is shown above), but that didn't work either and it just stopped doing anything whatsoever, but buttons did persist (didn't turn off)

I have no idea what the "correct" intended design is here (persisted view setting vs. client-side query param), and honestly at this point looking at the PR, I'm not sure the PR itself has settled on one either.

@mds08011

mds08011 commented Jul 7, 2026

Copy link
Copy Markdown
Author

Thanks for taking the time to build and test this! The intended design (per Kolaente's request) is a persisted view setting that lives inside the Task Collection filter. I pushed a revision so that the view components now correctly read and write the nested filter.include_subprojects. It seems to be building cleanly now, and I included a gif below testing it out.

View with filter setting

Setting

Toggle in action

@mds08011

Copy link
Copy Markdown
Author

Small follow-up: moved the duplicated updateIncludeSubprojects into the project store, and changed the Gantt view to show the source project as a muted label on the bar like list/kanban do.

@HarshPatel5940

Copy link
Copy Markdown

damnm, i was looking for this feature.

did we ensure that members of parent project can see tasks of child projects and its own, while child project members can only see their own

@mds08011

Copy link
Copy Markdown
Author

did we ensure that members of parent project can see tasks of child projects and its own, while child project members can only see their own

Yes this is the case. I added a test to check it as well.

zshzebra added a commit to zshzebra/infrastructure that referenced this pull request Aug 5, 2026
Pins vikunja to a self-built image of PR go-vikunja/vikunja#2939, which
shows tasks from child projects in parent project views. Built from
zshzebra/vikunja@finish-subprojects (v2.3.0-816-g13b0f4f4e) via a workflow
in that fork, and pinned by digest because the deploy role runs
`pull: always`.

Upstream's preview image was not usable: it was built seven weeks stale and
persisted the setting as a project_views column, whereas the current branch
nests it in the existing filter JSON. Migrating onto the preview build would
have written view settings into a column the merged version never reads.

The healthcheck moves to vikunja's own healthcheck subcommand; the image is
distroless so the previous wget check could never have worked.
@dodzod

dodzod commented Aug 17, 2026

Copy link
Copy Markdown

Hi - just bumping this in case anyone has time to finalise it - it looks like the only required test failure is "file is not properly formatted" which hopefully should be an easy fix, in fact it looks like it is just a surplus blank line. Sadly I don't have the practical development skills to add a commit, run the tests etc. or I would do so.

…walk

Upstream changed Project.ParentProjectID to *int64, so using it directly
as a map key no longer compiles. parentID() treats nil as 0, matching how
the rest of the codebase dereferences it.
@mds08011
mds08011 force-pushed the finish-subprojects branch from 4c7e119 to 423a851 Compare August 18, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/projects Project CRUD, sub-projects, project tree, archiving, templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants