Ticket #10331 (assigned defect)

Opened 8 months ago

Last modified 2 months ago

Tickets can't be moved and re-ordered within the backlog

Reported by: rjollos Assigned to: rjollos (accepted)
Priority: high Component: BacklogPlugin
Severity: normal Keywords:
Cc: anachesa, bart Trac Release: 0.11

Description

In Trac 0.11, the tickets cannot be moved and re-ordered in the backlog. There is an error in the javascript error console:

Uncaught TypeError: Object #<Object> has no method 'outerWidth' 

The plugin is using jQuery UI 1.7.2, which requires jQuery 1.3 or possibly 1.3.2 (the version available on the downloads page is 1.7.3 which requires 1.3.2). Trac 0.11 provides jQuery 1.2.3.

Attachments

Change History

09/17/12 07:36:47 changed by rjollos

  • owner changed from anachesa to rjollos.

09/21/12 05:02:21 changed by rjollos

Trac 0.11.1 provides jQuery 1.2.6, which jQuery UI 1.6 is compatible with. Version 1.2.6 is the minimum required jQuery for jQuery UI 1.5 through 1.6. Trac 0.11.0 provides jQuery 1.2.3. I can't find a version of jQuery UI older than 1.5, so I'll set a minimum required Trac version of 0.11.1 for the BacklogPlugin.

09/21/12 05:19:53 changed by rjollos

(In [12040]) Refs #9800, #10331: Added minimum required Trac version.

12/27/12 18:39:39 changed by rjollos

#10732 is a related ticket for the AdminEnumListPlugin.

12/27/12 19:40:01 changed by rjollos

(In [12488]) Fixes #10325, Refs #10331, #10333:

  • Added 3-Clause BSD license text.
  • jQuery UI 1.8.23 is used in Trac 0.12 and later. jQuery UI 1.6 is used in Trac 0.11.1 through Trac 0.11.7 (Trac 0.11.1 is the minimum version supported by the plugin).
  • Renamed BACKLOGS_VIEW permission to BACKLOG_VIEW.
  • Combined code in backlog-rw.js and backlog-ro.js to backlog.js.
  • Added skeleton code for an admin panel.
  • Added skeleton for unit tests.

01/24/13 03:05:38 changed by jun66j5

I believe that the checking version code in [12488], if trac_version > 0.12:, does not work.

$ ~/venv/trac/0.11.7/bin/python
Python 2.4.3 (#1, Jun 18 2012, 08:55:31)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from trac import __version__
>>> __version__
'0.11.7'
>>> __version__ > 0.12
True
>>>

We can use pkg_resouces.parse_version for comparison the versions. See also http://packages.python.org/distribute/pkg_resources.html#parsing-utilities and trac:source:trunk/trac/mimeview/tests/pygments.py?rev=11493#L84.

Index: backlog/web_ui.py
===================================================================
--- backlog/web_ui.py   (revision 12545)
+++ backlog/web_ui.py   (working copy)
@@ -105,7 +105,8 @@
             req.redirect(req.href.backlog(backlog_id))

         # TODO: use jQuery UI in Trac 1.0
-        if trac_version > 0.12:
+        from pkg_resources import parse_version
+        if parse_version(trac_version) >= parse_version('0.12'):
             add_script(req, 'backlog/js/jquery-ui-1.8.23.custom.min.js')
         else:
             add_script(req, 'backlog/js/jquery-ui-1.6.custom.min.js')

01/25/13 23:44:06 changed by rjollos

Thanks, it never seemed quite right to me, so I'm happy to know a better way now. I'll apply this patch and also take a look at #10732 this weekend.

03/13/13 19:04:51 changed by jun66j5

(In [12717]) refs #10331: follow-up to [12488], use pkg_resources.parse_version to compare the version strings

03/13/13 19:20:11 changed by jun66j5

BTW, sortable widget works well with Trac 0.12.5, however, it doesn't work with Trac 0.11.7. I got the following on Firefox.

Timestamp: 2013-03-14 03:05:54
Error: TypeError: (intermediate value)(...) is not a function
Source File: http://localhost:3000/chrome/backlog/js/jquery-ui-1.6.custom.min.js
Line: 24

To replace with http://ajax.googleapis.com/ajax/libs/jqueryui/1.6/jquery-ui.min.js, it works.

03/20/13 00:29:27 changed by rjollos

  • status changed from new to assigned.
  • priority changed from normal to high.

Ah, thanks. I guess we should pull down a new copy of jQuery 1.6. Feel free to commit any changes if you have something staged locally, and I'll try to get around to this eventually ;)

03/25/13 11:36:15 changed by jun66j5

(In [12795]) refs #10331: use http://ajax.googleapis.com/ajax/libs/jqueryui/1.6/jquery-ui.min.js for Trac 0.11.x to avoid javascript errors with jquery-ui-1.6.custom.min.js.

03/25/13 11:47:37 changed by jun66j5

(In [12796]) refs #10331: call Chrome.add_jquery_ui on Trac 1.0+ instead using the bundled jQuery UI files


Add/Change #10331 (Tickets can't be moved and re-ordered within the backlog)




Change Properties
Action