Menu

#25 non-numeric sorting on weekly totals page

v1.0 (example)
open
nobody
None
5
2015-12-25
2015-12-25
No

sorting on "weekly_totals" page doesn't work with numbers... It treats the elements like strings (i.e. 9.5 comes before 12)

In the code, I can't quite figure out the sorting process.. could someone look at this?

Related

Bugs: #25

Discussion

  • Kunal Marwaha

    Kunal Marwaha - 2015-12-25

    9.5 > 24 > 2 > 12 > 1, for example

     
  • Kunal Marwaha

    Kunal Marwaha - 2015-12-25

    on tableedit.js, line 1253,
    what is

    return pre_process_num(substring(a,1,a.length));
    should be

    return pre_process_num(a.substring(1,a.length));

     
  • Kunal Marwaha

    Kunal Marwaha - 2015-12-25

    If you change variable col_sortable to be the appropriate sort, the sorting works perfectly. I don't know how it's generated! For example, right now, 1-85 should be "pre_process_num" and 86-91 should be "pre_process_currency". Could someone look into this?

     
    • Janak

      Janak - 2015-12-25

      Thanks for filing the bug, Kunal. I'll try to look into this soon.

      On Fri, Dec 25, 2015 at 5:01 AM, Kunal Marwaha marwahaha@users.sf.net wrote:

      If you change variable col_sortable to be the appropriate sort, the sorting
      works perfectly. I don't know how it's generated! For example, right now,
      1-85 should be "pre_process_num" and 86-91 should be "pre_process_currency".
      Could someone look into this?


      [bugs:#25] non-numeric sorting on weekly totals page

      Status: open
      Group: v1.0 (example)
      Created: Fri Dec 25, 2015 09:02 AM UTC by Kunal Marwaha
      Last Updated: Fri Dec 25, 2015 09:37 AM UTC
      Owner: nobody

      sorting on "weekly_totals" page doesn't work with numbers... It treats the
      elements like strings (i.e. 9.5 comes before 12)

      In the code, I can't quite figure out the sorting process.. could someone
      look at this?


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/workshiftdb0/bugs/25/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #25


Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.