Use length property instead of size() member function

Bug #1879499 reported by Katsuya Nagai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
redmine (Ubuntu)
New
Undecided
Unassigned

Bug Description

size() function is not recommended in jQuery, use length property.
It maybe make trouble in gantt-progress-line.

---------------------- public/javascripts/application.js ----------------------
index b05e28d..cf33f12 100644
@@ -659,12 +659,12 @@ function beforeShowDatePicker(input, inst) {
   var default_date = null;
   switch ($(input).attr("id")) {
     case "issue_start_date" :
- if ($("#issue_due_date").size() > 0) {
+ if ($("#issue_due_date").length > 0) {
         default_date = $("#issue_due_date").val();
       }
       break;
     case "issue_due_date" :
- if ($("#issue_start_date").size() > 0) {
+ if ($("#issue_start_date").length > 0) {
         var start_date = $("#issue_start_date").val();
         if (start_date != "") {
           start_date = new Date(Date.parse(start_date));

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: redmine 4.0.6-2
ProcVersionSignature: Ubuntu 5.4.0-31.35-generic 5.4.34
Uname: Linux 5.4.0-31-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Tue May 19 22:37:21 2020
InstallationDate: Installed on 2018-05-04 (745 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64(20180108.1)
PackageArchitecture: all
SourcePackage: redmine
UpgradeStatus: Upgraded to focal on 2020-05-10 (9 days ago)

Revision history for this message
Katsuya Nagai (katsuya1128) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.