Project

General

Profile

Defect #816

Drag and drop does not work correctly on the Scrum board

Added by Mike Sanders almost 10 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
High
Category:
Sprint board
Target version:
-
Source:
Development
Detected on version:
Blocked:
No
Alone:
Milestones:

Description

1. Login to Redmine as a user that has permission to re-organize the scrumboard
2. Go to the Scrum section
3. Go to the Scrumboard
4. Attempt to drag and drop an item
5. Notice items will not move


Files

Screenshot from redmine1.png (154 KB) Screenshot from redmine1.png Danny Gorton, 2014-07-17 00:03
Screenshot from redmine2.png (136 KB) Screenshot from redmine2.png Danny Gorton, 2014-07-17 00:03
redmine developer role 1.png (216 KB) redmine developer role 1.png Danny Gorton, 2014-07-23 09:59
redmine developer role 2.png (201 KB) redmine developer role 2.png Danny Gorton, 2014-07-23 09:59
redmine project roles.png (203 KB) redmine project roles.png Danny Gorton, 2014-07-23 09:59
#1

Updated by Emilio González Montaña almost 10 years ago

Please provide a screenshot of your Scrum plugin settings. Most of the times there is an error there.

#2

Updated by Emilio González Montaña almost 10 years ago

  • Sprint set to Product backlog
#3

Updated by Danny Gorton almost 10 years ago

I have the same issue. I thought it might be permissions, but I can move backlog items up and down. I attached two screenshots of my Scrum plugin settings page.

#4

Updated by Danny Gorton over 9 years ago

Do you see an error in my plugin settings? Do you have any thoughts on how I might go about figuring out this problem? Is there something I might look for in a log, or maybe a web debugger? I'd like to plan some sprints but it's impossible if I can't move any tasks from the backlog status.

#5

Updated by Danny Gorton over 9 years ago

I figured out how to view the client-side sources for a plugin and was able to determine a few things. The main things are:

1) the post-its on the sprint board aren't decorated with the .post-it-horizontal-move-cursor CSS class, so the cursor is just normal, while on the project backlog board the items have the .post-it-vertical-move-cursor class.

2) the draggableOnTouchScreen method is not called for post-its on the sprint board, but it is for those on the project backlog board

3) in fact, the draggableOnTouchScreen isn't 'wired up' for the sprint board post-its. That implied a server-side rendering problem.

So I did a grep for draggableOnTouchScreen and found ./app/views/post_its/sprint_board/_task.js.erb contains this logic

if User.current.allowed_to?(:edit_sprint_board, project) and task.editable?

and ./app/views/post_its/product_backlog/_pbi.html.erb contains this logic

if User.current.allowed_to?(:edit_product_backlog, project) and pbi.editable?

Those bits of code indicate that it does indeed seem to be a permissions issue. So looking at my permissions, I was in 3 roles and two of those roles have zero Scrum permissions and the other role has all Scrum permissions. So I removed myself from the roles with no permissions and that had no effect. So I gave all roles all permissions and that had no effect. So now I'm wondering what the problem might be. There is another condition in that check that I'm not sure how to check: task.editable? It could be that my permissions are OK, but the task isn't editable. What makes a task NOT editable? I've attached three more screen shots showing my roles and permissions settings.

#6

Updated by Michael Kimsal over 9 years ago

  1. Returns true if user or current user is allowed to edit or add a note to the issue
    def editable?(user=User.current)
    user.allowed_to?(:edit_issues, project) || user.allowed_to?(:add_issue_notes, project)
    end

If the user can edit issues and add issue notes, the issue is "editable".

Doesn't really help me, as I have those permissions, and still can't move items on the sprint board. :/

#7

Updated by Michael Kimsal over 9 years ago

in /plugins/scrum/app/views/post_its/sprint_board/_pbi_status.js.erb

change the 'accept' indicating ".sprint-task" to ".sprint-pbi"

The task cards are not being decorated properly, I guess. This worked for me on the 0.7.0 version. There's no public code repo for the project that I know of, so I can't submit a patch. :(

#8

Updated by Danny Gorton over 9 years ago

Michael Kimsal escribió:

in /plugins/scrum/app/views/post_its/sprint_board/_pbi_status.js.erb

change the 'accept' indicating ".sprint-task" to ".sprint-pbi"

The task cards are not being decorated properly, I guess. This worked for me on the 0.7.0 version. There's no public code repo for the project that I know of, so I can't submit a patch. :(

Interesting, I see where that change matches one of the CSS classes my tasks are decorated with, so it makes sense but it doesn't solve my problem. Before you fixed it, were you able to initiate the drag, but not able to drop the task? I can't initiate the drag.

#9

Updated by Danny Gorton over 9 years ago

Well, something's weird here. I upgraded to version 0.7.0 and applied the patch that Michael Kimsal supplied but I still couldn't initiate a drag operation on the sprint board. Digging through the code, I couldn't see where the 'draggableOnTouchScreen' logic was being applied to items in my PBI list at all. So I hacked in some javascript from the _tasks.js.erb and retried. Now I can at least initiate a drag from the PBI list. It fails to persist the status update and I can't move it back to the PBI list though. And if I remove the patch supplie by Michael, I can initiate the drag, but I can't drop anywhere (as expected, because the class names don't match up).

I'll admit to complete ignorance in a ruby environment, but what I don't understand is how this could be working for anyone if there is never a call to decorate PBI items for dragging. Anyone have any ideas on that?

#10

Updated by Danny Gorton over 9 years ago

If I'm going to figure this out I'm going to need some instruction on how the drag-n-drop is supposed to function on the Scrum board. Based on what I see it shouldn't work at all, but I know that's not true because others have it working. So I'm missing a crucial bit. What part of the server-side code makes the Scrum board draggable?

#11

Updated by Ken T over 9 years ago

I'm having this issue as well, basically identical to Danny.

I'd be happy to donate $10 if it would expedite this patch.

#12

Updated by Emilio González Montaña over 9 years ago

The crucial point is to reproduce this bug, I've a lot of instances of Redmine with this plugin installed, all of them working... I'm not saying it's not a bug, I just saying I cannot help if I don't know how to reproduce it...

Could you provide more details about the environment? client & server side? (OS, version, ruby & rails version...), if I'm able I will try to reproduce it whit those settings, unless you provide me remote access to your deployment.

#13

Updated by Danny Gorton over 9 years ago

I fully understand the challenges of trying to fix issues that you cannot reproduce, I do it for a living. ;) I just wish I knew more about the Ruby environment, or had time to learn it, I'd debug it myself. If you could kind of instruct me as to what part of the code is supposed to emit the draggable HTML/Javascript to the client I can probably be of help. I just don't see where that is supposed to happen with the PBI items.

As for my setup, I'm running on Ubuntu 14.04 (64-bit) as a VM under VMWare ESXi. My instance is not manageable from the public address, but the app is accessible from there, and I don't control that firewall. I do control VPN access, so if you have an OpenVPN client, or you're willing to install one, you could be able to access it to troubleshoot that way. My plugin code has been tinkered with a little bit due to me trying to solve this issue though.

As for clients, I've tried accessing it from Ubuntu clients running Chromium and Firefox as well as Windows clients running Chrome and Explorer. It definitely seems to be a server-side issue, and it has to be with the conditions surrounding the code in _task.js.erb that produces the .draggable(...) javascript. I don't see that code in my rendered page for any items on the sprint board, therefore the server isn't putting it in, so that condition must be failing (how to debug that? - <%- if User.current.allowed_to?(:edit_sprint_board, project) and task.editable? -%>). I have put the code inside that condition OUTSIDE the condition and then my items are draggable, but it causes other issues that I don't recall right now.

Redmine environment is as follows:

Environment:
Redmine version 2.5.2.stable.13333
Ruby version 2.0.0-p481 (2014-05-08) [x86_64-linux]
Rails version 3.2.19
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Mercurial 2.8.2
Git 1.9.1
Filesystem
Redmine plugins:
redmine_bootstrap_kit 0.1
redmine_ckeditor 1.0.16
redmine_custom_js_and_css 0.0.1
redmine_graphs 0.1.0
redmine_impersonate 0.0.1
redmine_issue_checklist 2.0.5
redmine_jenkins 0.1
redmine_private_wiki 0.2.2
redmine_release_notes 1.3.1
redmine_screenshot_paste 2.1.0
redmine_theme_changer 0.1.0
scrum 0.7.0
timelog_timer 2.0.0

I'll work with you in any way you want to try to figure this out. If you want to send me an email directly I can send you further contact information for phone, IM, or whatever, whenever you want to work on it. If I can get free to help figure it out I will. As you say, there are many instances out there working so this has to be some weird condition caused by how I installed the plugin, or how I initially set it up, or something like that.

#14

Updated by Michael Kimsal over 9 years ago

Hello Danny and others.

I maybe should clarify a bit.

For me, I can't change the position of anything on the PBI on the scrum pages. But if I create a subtask, it will be created with 'new', dropped in the 'new' column, and then I can drag that right/left as need be. but overall that's not a great workaround. I thought it was just a weird convoluted way of structuring a project, but I think it's still just a bug.

#15

Updated by Francisco Bischoff over 9 years ago

Michael Kimsal escribió:

Hello Danny and others.

I maybe should clarify a bit.

For me, I can't change the position of anything on the PBI on the scrum pages. But if I create a subtask, it will be created with 'new', dropped in the 'new' column, and then I can drag that right/left as need be. but overall that's not a great workaround. I thought it was just a weird convoluted way of structuring a project, but I think it's still just a bug.

For me its like Michael said. I think it's not a bug, but a feature. Here it works fine if I create a PBI with subtasks, but took me a while to figure out.

#16

Updated by Danny Gorton over 9 years ago

Ahhh...I didn't get that from my initial read of how it's supposed to work. I appreciate Michael posting his clarification and for the validation from Francisco. I was able to do that as well after some reconfiguration of plugin settings. It just seems like a hole to me - I don't need subtasks at all and consider the extra Issues to be clutter. But it does make a comment about the plugin by Michael Sanders make sense now: "All this plugin needs is the ability for top-level items only." (http://www.redmine.org/plugins/scrum-plugin). It also validates that my understanding of the code is correct - I'm not missing anything like I thought when I considered this a bug. I still have the issue that I can't drop an item on the Scrum board, but I know that is caused by an incorrect CSS class emitted as reported above by Michael Kimsal.

I guess I'll have to dig in and try to figure out how to make that drag-n-drop work on top-level items - I had this started before when I thought it was a bug. It would also be nice to be able to use the Issues context menu to change the Sprint value without having to go into edit the item, so I'll have to see if I can figure that out too.

It seems my whole complaint is based on my lack of understanding of this plugin's capabilities and for that I apologize. I still don't see anywhere in the wiki where it describes this flow though, so I guess there's at least a beef with documentation. Thanks again everyone.

#17

Updated by Emilio González Montaña almost 8 years ago

  • Category set to Sprint board
  • Blocked set to No

This is not a bug (maybe & only maybe a future feature).

#18

Updated by Emilio González Montaña almost 8 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF