Ignore:
Timestamp:
Oct 5, 2010, 2:24:33 AM (14 years ago)
Author:
gav
Message:

Improvements to assetRegister report, adding site and section to page header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/AssetReportService.groovy

    r679 r681  
    2424        def result = [:]
    2525
     26        result.section = Section.get(params.section.id.toLong())
     27        result.site = result.section.site
     28
    2629        // Inner join used to return only attribTypes that are used by AssetExtendedAttributes.
    2730        // So the result is only asset extendedAttributeTypes.
     
    4447                    'left join asset.assetExtendedAttributes as attrib',
    4548                    'left join attrib.extendedAttributeType as attribT'
    46             if(params.section instanceof Section) {
    47                 namedParams.section = params.section
    48                 where 'asset.section = :section'
    49             }
     49            where 'asset.section = :section'
     50                    namedParams.section = result.section
    5051            order 'by asset.name asc, attribT.name asc'
    5152        }
Note: See TracChangeset for help on using the changeset viewer.