[DRE-maint] Bug#950570: redmine (4.0.4-3~bpo10+1): jquery 3 and gantt.js => bug

François Capon debian at francoiscapon.com
Mon Feb 3 16:15:19 GMT 2020


Package: redmine
Version: 4.0.4-3~bpo10+1
Severity: normal

Dear Maintainers,

The Gantt page use JavaScript (gantt.js and jquery) to draw the "Related 
issues" and the "Progress line" (unfold the Options)
- https://www.redmine.org/projects/redmine/wiki/RedmineGantt
But the size() function don't exist any more in jQuery 3.0, so the 
script is broken.
- https://api.jquery.com/size/  Note: This method has been removed in 
jQuery 3.0. Use the .length property instead.
- console.log(jQuery.fn.jquery) ->  3.3.1

If I replace all the .size() by .length in gantt.js, everything works well:
function drawRelations() {
      ...
     // if (issue_from.size() == 0 || issue_to.size() == 0) {  // 
example line 40
     if (issue_from.length == 0 || issue_to.length == 0) {
           return;
     }
     ...

The redmine project use an old jquery, so they don't have yet the problem.
- http://svn.redmine.org/redmine/branches/4.0-stable/public/javascripts/

Regards,
François.



More information about the Pkg-ruby-extras-maintainers mailing list