Modify

Opened 4 years ago

Last modified 4 years ago

#10331 new defect

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

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: high Component: BacklogPlugin
Severity: normal Keywords:
Cc: Anna Nachesa, Bart Ogryczak 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 (0)

Change History (13)

comment:1 Changed 4 years ago by Ryan J Ollos

Owner: changed from Anna Nachesa to Ryan J Ollos

comment:2 Changed 4 years ago by Ryan J Ollos

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.

comment:3 Changed 4 years ago by Ryan J Ollos

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

comment:4 Changed 4 years ago by Ryan J Ollos

#10732 is a related ticket for the AdminEnumListPlugin.

comment:5 Changed 4 years ago by Ryan J Ollos

(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.

comment:6 Changed 4 years ago by Jun Omae

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.

  • backlog/web_ui.py

     
    105105            req.redirect(req.href.backlog(backlog_id))
    106106
    107107        # TODO: use jQuery UI in Trac 1.0
    108         if trac_version > 0.12:
     108        from pkg_resources import parse_version
     109        if parse_version(trac_version) >= parse_version('0.12'):
    109110            add_script(req, 'backlog/js/jquery-ui-1.8.23.custom.min.js')
    110111        else:
    111112            add_script(req, 'backlog/js/jquery-ui-1.6.custom.min.js')

comment:7 Changed 4 years ago by Ryan J Ollos

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.

comment:8 Changed 4 years ago by Jun Omae

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

comment:9 Changed 4 years ago by Jun Omae

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.

comment:10 Changed 4 years ago by Ryan J Ollos

Priority: normalhigh
Status: newassigned

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 ;)

comment:11 Changed 4 years ago by Jun Omae

(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.

comment:12 Changed 4 years ago by Jun Omae

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

comment:13 Changed 4 years ago by Ryan J Ollos

Status: assignednew

Modify Ticket

Action
as new The owner will remain Ryan J Ollos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.