Changeset 1870 for trunk


Ignore:
Timestamp:
May 24, 2011, 5:06:54 PM (9 years ago)
Author:
work@…
Message:
  • improved sample sorting for #423
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r1857 r1870  
    215215         */
    216216        def ArrayList<Subject> giveSamplesForTemplate(Template template) {
     217                // sort in a concatenated string as sorting on 3 seperate elements
     218                // in a map does not seem to work properly
    217219                samples.findAll { it.template.equals(template) }.sort {
    218                         [it.parentEvent?.template, it.parentEvent?.startTime, it.parentSubject?.name]
     220                        "${it.parentEvent?.template}|${it.parentEvent?.startTime}|${it.parentSubject?.name}"
    219221                }
    220222        }
Note: See TracChangeset for help on using the changeset viewer.