Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10280 closed defect (fixed)

Desc/Asc sort issue

Reported by: sdegrande Owned by: Ryan J Ollos
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos 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 12 years 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 12 years ago by Ryan J Ollos

Owner: changed from Radek Bartoň to Ryan J Ollos
Status: newassigned

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 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(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 Changed 12 years ago by Ryan J Ollos

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 ; Changed 12 years 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 12 years 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.