Modify

Opened 2 years ago

Last modified 2 years ago

#9999 assigned defect

Filter for milestone doesn't work with umlauts

Reported by: rochi Owned by: ChrisNelson
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 2 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 2 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 2 years ago by bill5753@…

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

comment:4 Changed 2 years ago by ChrisNelson

  • Status changed from new to assigned

comment:5 Changed 2 years ago by ChrisNelson

I can reproduce this but a patch would be welcome.

comment:6 Changed 2 years ago by ChrisNelson

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 2 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 2 years ago by ChrisNelson

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

Thanks to falkb for the patch.

Add Comment

Modify Ticket

Action
as assigned .
Author


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

 
Note: See TracTickets for help on using tickets.