Modify

Opened 12 years ago

Last modified 12 years ago

#9999 assigned defect

Filter for milestone doesn't work with umlauts

Reported by: Rochi Owned by: Chris Nelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The filter for Milestones doesn't work with german umlauts.

milestone=SäHO

doesn't work

Attachments (0)

Change History (8)

comment:1 Changed 12 years ago by bill5753@…

I had confronted with the same problem, milestone=研发中心, when the milestone's name is Chinese, JS Gantt will not work.

comment:2 Changed 12 years ago by bill5753@…

I found a solution for that, as long as you can use the TracQuery syntax as a filter, you can sort the specific tickets by keywords which written in ascii character in advance, so that you can have all things done

comment:3 Changed 12 years ago by bill5753@…

I haved solved that problem, the patch will coming soon.

comment:4 Changed 12 years ago by Chris Nelson

Status: newassigned

comment:5 Changed 12 years ago by Chris Nelson

I can reproduce this but a patch would be welcome.

comment:6 Changed 12 years ago by Chris Nelson

This problem appears to arise from

        # Construct the querystring. 
        query_string = '&'.join(['%s=%s' % 
                                 (f, str(v)) for (f, v) in 
                                 query_args.iteritems()]) 

which forces values to (ASCII) strings.

comment:7 Changed 12 years ago by falkb

I had this problem with German umlauts too, and this one has helped:

  • tracjsganttplugin/0.11/tracjsgantt/tracjsgantt.py

     
    33from datetime import timedelta, datetime
    44from operator import itemgetter, attrgetter
    55
     6from trac.util.text import to_unicode
    67from trac.util.html import Markup
    78from trac.util.text import javascript_quote
    89from trac.wiki.macros import WikiMacroBase
     
    299300
    300301        # Construct the querystring.
    301302        query_string = '&'.join(['%s=%s' %
    302                                  (f, str(v)) for (f, v) in
     303                                 (f, unicode(v)) for (f, v) in
    303304                                 query_args.iteritems()])
    304305
    305306        # Get the Query Object.

comment:8 Changed 12 years ago by Chris Nelson

(In [11740]) Allow unicode field values (e.g,. for accents in milestones). Refs #9999.

Thanks to falkb for the patch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Chris Nelson.

Add Comment


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

 
Note: See TracTickets for help on using tickets.