Content
View differences
Updated by Aleix Suau 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**
* [x] Upgrade account to have access to boards
**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 second one is a bit more complicated. You will have to
* Load all Types to find out the IDs of all types which are not milestones
* Load all work packages in the current project which have a type ID contained in one of the above
The first one: Inject `TypeDmService` and get the types `typeDmService.loadAll().then(types => types.filter(type => !type.isMilestone))` (this should be moved into a \`TypeCacheService\` but there isn't one at the momentThe second one then is rather easy
this.halResourceService
.get(
this.pathHelper.api.v3.withOptionalProject(currentProjectId).work\_packages.toPath()
{ filters: buildApiV3Filter('type', '=', types.map(type => type.id)).toJson() }
)
it calls a `GET /api/v3/projects/<current project id>/work_packages?filter=[{ type: { operator: '=', values: [1,2,3...] }]`
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)
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**
* [x] Upgrade account to have access to boards
**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 second one is a bit more complicated. You will have to
* Load all Types to find out the IDs of all types which are not milestones
* Load all work packages in the current project which have a type ID contained in one of the above
The first one: Inject `TypeDmService` and get the types `typeDmService.loadAll().then(types => types.filter(type => !type.isMilestone))` (this should be moved into a \`TypeCacheService\` but there isn't one at the momentThe second one then is rather easy
this.halResourceService
.get(
this.pathHelper.api.v3.withOptionalProject(currentProjectId).work\_packages.toPath()
{ filters: buildApiV3Filter('type', '=', types.map(type => type.id)).toJson() }
)
it calls a `GET /api/v3/projects/<current project id>/work_packages?filter=[{ type: { operator: '=', values: [1,2,3...] }]`
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)
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