Changeset 2122


Ignore:
Timestamp:
Nov 29, 2011, 3:18:19 PM (5 years ago)
Author:
work@…
Message:

fixed issue #518 where some templates did not show all template fields when multiple templates exist for different entities but with the same name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/StudyWizardController.groovy

    r2121 r2122  
    16141614                def number              = params.get('addNumber') as int
    16151615                def species             = Term.findByName(params.get('species'))
    1616                 def template    = Template.findByName(params.get('template'))
     1616                def template    = Template.findAllByName( params.get('template')).find { it.entity == dbnp.studycapturing.Subject }
    16171617
    16181618                // can we add subjects?
     
    18981898                        def templateName = params.get('template_' + sample.getIdentifier())
    18991899                        if (templateName && sample.template?.name != templateName) {
    1900                                 sample.template = Template.findByName(templateName)
     1900                                sample.template = Template.findAllByName(params.get(templateName)).find { it.entity == dbnp.studycapturing.Sample }
    19011901                        }
    19021902
Note: See TracChangeset for help on using the changeset viewer.