Modify

Opened 22 months ago

Closed 22 months ago

Last modified 21 months ago

#10280 closed defect (fixed)

Desc/Asc sort issue

Reported by: sdegrande Owned by: rjollos
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 1.0

Description

Changing the ascending/descending sort order of a column (via the triangular arrows on the HTML table, or via the configuration parameters in trac.ini) has no impact.

The proposed attached patch fixes that issue.

Thanks for your great work !

Attachments (0)

Change History (6)

comment:1 Changed 22 months ago by sdegrande

I was not able to attach a file on the ticket, so here is the diff:

  • downloadsplugin/0.12/tracdownloads/api.py

    diff -r ec2c58e517b9 downloadsplugin/0.12/tracdownloads/api.py
    a b  
    502502                if context.req.args.has_key('desc'): 
    503503                    desc = context.req.args.get('desc') == '1' 
    504504                else: 
    505                     desc = self.download_sort_direction 
     505                    desc = self.download_sort_direction == 'desc' 
    506506 
    507507                self.data['order'] = order 
    508508                self.data['desc'] = desc 
     
    533533                if context.req.args.has_key('desc'): 
    534534                    desc = context.req.args.get('desc') == '1' 
    535535                else: 
    536                     desc = self.download_sort_direction 
     536                    desc = self.download_sort_direction == 'desc' 
    537537                download_id = int(context.req.args.get('download') or 0) 
    538538 
    539539                self.data['order'] = order 
     
    630630                if context.req.args.has_key('desc'): 
    631631                    desc = context.req.args.get('desc') == '1' 
    632632                else: 
    633                     desc = self.architecture_sort_direction 
     633                    desc = self.architecture_sort_direction == 'desc' 
    634634                architecture_id = int(context.req.args.get('architecture') or 0) 
    635635 
    636636                # Display architectures. 
     
    683683                if context.req.args.has_key('desc'): 
    684684                    desc = context.req.args.get('desc') == '1' 
    685685                else: 
    686                     desc = self.platform_sort_direction 
     686                    desc = self.platform_sort_direction == 'desc' 
    687687                platform_id = int(context.req.args.get('platform') or 0) 
    688688 
    689689                # Display platforms. 
     
    736736                if context.req.args.has_key('desc'): 
    737737                    desc = context.req.args.get('desc') == '1' 
    738738                else: 
    739                     desc = self.type_sort_direction 
     739                    desc = self.type_sort_direction == 'desc' 
    740740                platform_id = int(context.req.args.get('type') or 0) 
    741741 
    742742                # Display platforms. 

comment:2 in reply to: ↑ description Changed 22 months ago by rjollos

  • Owner changed from Blackhex to rjollos
  • Status changed from new to assigned

Replying to sdegrande:

Changing the ascending/descending sort order of a column (via the triangular arrows on the HTML table, or via the configuration parameters in trac.ini) has no impact.

My observation was that changing the sort direction by clicking on the arrow worked correctly, but setting the option in trac.ini had no effect.

comment:3 Changed 22 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [12067]) Fixes #10280: FIX: specifying a sort direction in trac.ini had no effect. Thanks to sdegrande for the patch.

Removed egg accidentally committed in [12064].

comment:4 follow-up: Changed 22 months ago by rjollos

Please report back if you have a chance to test the latest trunk. Note the directory reoganization in [12063:12066].

comment:5 in reply to: ↑ 4 ; follow-up: Changed 22 months ago by sdegrande

Replying to rjollos:

Please report back if you have a chance to test the latest trunk. Note the directory reoganization in [12063:12066].

I'll will do ASAP.

Thanks for your work.

comment:6 in reply to: ↑ 5 Changed 21 months ago by sdegrande

Replying to sdegrande:

Replying to rjollos:

Please report back if you have a chance to test the latest trunk. Note the directory reoganization in [12063:12066].

I'll will do ASAP.

Thanks for your work.

I just tested r12139.

Works well. Thanks.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.