Changeset 14519


Ignore:
Timestamp:
8 Feb 2017, 09:22:23 (8 years ago)
Author:
Henrik Bettermann
Message:

Sort arguments in table of ReportsContainerPage.

Location:
main/waeup.kofa/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r14514 r14519  
    441.4.2.dev0 (unreleased)
    55=======================
     6
     7* Sort arguments in table of `ReportsContainerPage`.
    68
    79* Add `entry_session` and `p_session` filter to Student Payment Statistics
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/reports.py

    r14171 r14519  
    8989            generator = queryUtility(IReportGenerator, name=gen_name)
    9090            gen_title = translate(getattr(generator, 'title', _('Unknown')))
    91             args = ', '.join([str(x) for x in job.kwargs['kw'].values()])
    92             descr = '%s (%s)' % (gen_title, args)
     91            # Sort arguments
     92            sorted_items = sorted(
     93                job.kwargs['kw'].items(), key=lambda value:value[0])
     94            sorted_values = [i[1] for i in sorted_items]
     95            arguments = ', '.join([str(x) for x in sorted_values])
     96            descr = '%s (%s)' % (gen_title, arguments)
    9397            status = job.finished and 'ready' or 'running'
    9498            status = job.failed and 'FAILED' or status
Note: See TracChangeset for help on using the changeset viewer.