backlogs / redmine_backlogs

A Redmine plugin for agile teams
https://backlogs.github.io/www/
GNU General Public License v2.0
773 stars 460 forks source link

drag&drop doesn't work with project tree #1157

Open fuminori-ido-m opened 1 year ago

fuminori-ido-m commented 1 year ago

When projects are tree structure and each story points to sub-tree, drag&drop on backlog page doesn't work.

lib/backlogs_project_patch.rb adds droppable_sprints method which generates like the following data-structure (*a):

{
  project-id-A, [story-a, story-b, ...],
  project-id-B, [story-c, story-d, ...],
  ...
}

When project A is a sub-node of project B, backlog page sprint is as follows:

Sprint-X
story-a
story-b
story-c
story-d

and each story line keeps project-id the story refers, while RB.constants.project_versions which map (*a) above. When Sprint-X belongs to project-B (parent of project-A), drag story-a --> project-A --> d RB.constants.project_versions[project-A] doesn't contain Sprint-X. This is why story-a and story-b are not enabled to drag on mouseDown.