Modify

Opened 2 years ago

Closed 2 years ago

#10128 closed defect (fixed)

drag and drop doesn't work

Reported by: rulbrich@… Owned by: robguttman
Priority: normal Component: QueuesPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

The drag and drop feature doesn't work. I've tried IE9 and Chrome without success. Javascript is enabled and the jquery scripts seem to be downloaded correctly (according to the chrome developer tool). I'm running trac 0.12.2. QueuesPlugin 0.1.0 (r11706).

Here are the relevant sections in my trac.ini:

[queues]
reports = 9,10

[ticket-custom]
position = text
effort = select
effort.options = 0-2|3-5|6-10|10+
effort.value = 1

Here is my report definition (I am using an sqlite3 database):

SELECT p.value AS __color__,
   cp.value AS position, id AS ticket, summary, component, version, milestone, t.type AS type, 
   owner, ce.value AS effort, status,
   time AS created,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
     LEFT OUTER JOIN ticket_custom cp ON (t.id = cp.ticket AND cp.name = 'position' )
     LEFT OUTER JOIN ticket_custom ce ON (t.id = ce.ticket AND ce.name = 'effort' )
     JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  WHERE status <> 'closed'
  ORDER BY CAST((CASE p.value
                   WHEN '' THEN '0'
                   ELSE COALESCE(p.value,'0') END) AS INTEGER) ASC, milestone, t.type, time

Attachments (0)

Change History (12)

comment:1 Changed 2 years ago by rulbrich@…

Also, at the top of my report it does have a gray box that states that it is a special queue report.

comment:2 Changed 2 years ago by robguttman

  • Status changed from new to assigned

rulbrich, it sounds like the plugin isn't fully configured yet. The first thing to check is that the plugin is listed in the Plugins list of the Admin section. If it's listed then check that all of its components are enabled.

Next would be double-checking that you're looking at report 9 or 10 - since those are the only two reports where the queue behavior should be enabled according to your trac.ini config above.

Let me know if these tipis don't resolve your issue.

comment:3 Changed 2 years ago by rulbrich@…

Rob,

The plugin is listed in the admin page. Both QueuesAjaxModule and QueuesModule are enabled.

And, I am looking at report 9, which my previous comment should have clarified since I am seeing the gray box at the top of the report. Also, it seems like the plugin is getting loaded, because I am not able to sort the table by the column header as I would be able to in a regular report.

I also just fixed a minor issue with the report code in the ORDER BY clause (but still not working):

SELECT p.value AS __color__,
   cp.value AS position, id AS ticket, summary, component, version, milestone, t.type AS type, 
   owner, ce.value AS effort, status,
   time AS created,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
     LEFT OUTER JOIN ticket_custom cp ON (t.id = cp.ticket AND cp.name = 'position' )
     LEFT OUTER JOIN ticket_custom ce ON (t.id = ce.ticket AND ce.name = 'effort' )
     JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  WHERE status <> 'closed'
  ORDER BY CAST((CASE cp.value
                   WHEN '' THEN '0'
                   ELSE COALESCE(cp.value,'0') END) AS INTEGER) ASC, milestone, t.type, time

Finally, I disabled and reenabled the plugin from the admin page, but it still didn't work.

I've restarted apache. Is there anything else you might suggest?

Thanks,
Robert

comment:4 Changed 2 years ago by robguttman

Robert, apologies - I read your comment above wrong.

The plugin disables table sorting as the sort order is critical for the plugin to order the queue correctly.

When you say drag-and-drop does not work, are you saying you can't actually drag-and-drop tickets to new locations or that the tickets' position field is not getting updated?

comment:5 follow-up: Changed 2 years ago by rulbrich@…

The actual drag and drop is not working. I've tried grabbing a table row from several different places and it just won't drag.

comment:6 in reply to: ↑ 5 Changed 2 years ago by robguttman

Replying to rulbrich@capsher.com:

The actual drag and drop is not working. I've tried grabbing a table row from several different places and it just won't drag.

Ok, in that case it could be that there's a JS error somewhere - possibly from a different plugin that's preventing all subsequent JS libs from loading properly. Can you check the JavaScript Console to see what errors you may be getting? In Chrome, for example, it's under View > Developer > JavaScript Console.

comment:7 Changed 2 years ago by rulbrich@…

The only plugin I have is the QueuesPlugin.

There are no JavaScript errors in Chrome. I do have a warning about loading insecure content. This is because I am running trac on an SSL server and the logo is being pulled from a non-SSL site.

Any other ideas?

comment:8 Changed 2 years ago by robguttman

Hmm. It sounds like the JS lib isn't loaded. Under View > Developer > Developer Tools > Resources, can you find a queues.js listed somewhere under the Frames section? How about jquery-ui-1.8.16.custom.min.js?

If you're missing either of the above, the issue could be how the package was installed. Doing a straight "easy_install" on the tarball may be the easiest way to install if that's acceptable.

comment:9 Changed 2 years ago by rulbrich@…

Both scripts show up as resources in Chrome. They seem to be loaded correctly.

I did an easy_install of the Python egg and it installed into the system python directory. I don't know if I should be passing a path or something, because it did not install into the trac plugins directory.

comment:10 Changed 2 years ago by robguttman

(In [11715]) refs #10128: fixing default group behavior to 'reorder' (from 'ignore')

comment:11 Changed 2 years ago by robguttman

Robert, thank you - you found a bug. I was able to reproduce your problem. It seems I had changed the default group behavior to 'ignore' when it should be 'reorder'. I just committed a fix which should resolve the issue for you. Let me know if this works or not for you. Apologies for the problems you had and thank you for your patience and help diagnosing this issue!

comment:12 Changed 2 years ago by anonymous

  • Resolution set to fixed
  • Status changed from assigned to closed

Robert, I am going to assume my latest fix works for you. If it doesn't, please reopen this ticket with more details.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.