Content
View differences
Updated by Oliver Günther almost 6 years ago
* Add "subtasks" type action board
* Each column will contain a work package
* The cards in the column are filtered to show only the selected work package's children
* All work packages in the project that are elligable to be a parent may be selected as a column (no milestones)
* Work packages can be dragged and dropped between parents
**Open for discussion**
* Permission handling if selected work package is located in a subproject
**Related pull request**: https://github.com/opf/openproject/pull/8504
**Notes**
* Create a new action service
* To change the parent relation: frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts
* Column creation modal should contain a typeahead
**TODO**
* [ ] Oliver:
* [ ] Why putFromPromiseIfPristine on subtasks-action.service?
* [ ] What is subtask input for?
* [x] Upgrade account to have access to boards
* [x] Translation not shown (missing "en.js.boards.board\_type.action\_type.subtask")
**MORE INFO**
You will need two things:
1. The actual filter value for the columns, this is `parent = <selected ID for the colum>` meaning: Give me all children of <selected ID>
2. The applicable work packages. This will be all work packages in the current project that CAN be a parent. Which is every work package except for milestones
~~The The second one is a bit more complicated. You will have to~~ to
* ~~Load Load all Types to find out the IDs of all types which are not milestones~~ milestones
* ~~Load Load all work packages in the current project which have a type ID contained in one of the above~~ above
~~The The first one: Inject~~ `~~TypeDmService~~` ~~and Inject `TypeDmService` and get the types~~ `~~typeDmService.loadAll().then(types types `typeDmService.loadAll().then(types => types.filter(type => !type.isMilestone))~~` ~~(this !type.isMilestone))` (this should be moved into a \`TypeCacheService\` but there isn't one at the momentThe second one then is rather easy~~ easy
~~this.halResourceService~~
~~.get(~~
~~this.pathHelper.api.v3.withOptionalProject(currentProjectId).work\_packages.toPath()~~
~~{ this.halResourceService
.get(
this.pathHelper.api.v3.withOptionalProject(currentProjectId).work\_packages.toPath()
{ filters: buildApiV3Filter('type', '=', types.map(type => type.id)).toJson() }~~
~~)~~ }
)
~~it it calls a~~ `~~GET a `GET /api/v3/projects/<current project id>/work_packages?filter=[{ type: { operator: '=', values: [1,2,3...] }]~~` }]`
~~and and this will get all work packages of the project that are eligable to be a parent - they might also already be a parent but that shouldn't matter (editado)~~ matter (editado)
Finding out all applicable parents is easy now with the `is_milestone` filter.
now the problem is that this call might result in a large number of work packages, which is why in the Add List ... Modal we need to use this query with an autocompleter
but that could be a separate refactoring I can do later
* Each column will contain a work package
* The cards in the column are filtered to show only the selected work package's children
* All work packages in the project that are elligable to be a parent may be selected as a column (no milestones)
* Work packages can be dragged and dropped between parents
**Open for discussion**
* Permission handling if selected work package is located in a subproject
**Related pull request**: https://github.com/opf/openproject/pull/8504
**Notes**
* Create a new action service
* To change the parent relation: frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts
* Column creation modal should contain a typeahead
**TODO**
* [ ] Oliver:
* [ ] Why putFromPromiseIfPristine on subtasks-action.service?
* [ ] What is subtask input for?
* [x] Upgrade account to have access to boards
* [x] Translation not shown (missing "en.js.boards.board\_type.action\_type.subtask")
**MORE INFO**
You will need two things:
1. The actual filter value for the columns, this is `parent = <selected ID for the colum>` meaning: Give me all children of <selected ID>
2. The applicable work packages. This will be all work packages in the current project that CAN be a parent. Which is every work package except for milestones
~~The
* ~~Load
* ~~Load
~~The
~~this.halResourceService~~
~~.get(~~
~~this.pathHelper.api.v3.withOptionalProject(currentProjectId).work\_packages.toPath()~~
~~{
.get(
this.pathHelper.api.v3.withOptionalProject(currentProjectId).work\_packages.toPath()
{
~~)~~
)
~~it
~~and
Finding out all applicable parents is easy now with the `is_milestone` filter.
now the problem is that this call might result in a large number of work packages, which is why in the Add List ... Modal we need to use this query with an autocompleter
but that could be a separate refactoring I can do later