Ignore:
Timestamp:
Oct 6, 2010, 5:31:07 AM (9 years ago)
Author:
gav
Message:

Add admin feature to create recommended extended attributes for assets and level 1 assetSubItems, part 2.

File:
1 edited

Legend:

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

    r688 r689  
    246246
    247247        def assets = Asset.list()
    248         def locationDescription = ExtendedAttributeType.get(5)
    249         def ecr = ExtendedAttributeType.get(9)
    250         def assetNumber = ExtendedAttributeType.get(17)
    251         def assetCondition = ExtendedAttributeType.get(16)
    252         def maintenancePercentComplete = ExtendedAttributeType.get(13)
    253         def registrationRequired = ExtendedAttributeType.get(14)
    254         def registrationExpiryDate =  ExtendedAttributeType.get(15)
    255         def regulatoryRequirement = ExtendedAttributeType.get(12)
    256         def riskLevel = ExtendedAttributeType.get(10)
    257         def safeWorkProcedure = ExtendedAttributeType.get(11)
     248        def locationDescription = ExtendedAttributeType.findByName("Location Description")
     249        def ecr = ExtendedAttributeType.findByName("ecr")
     250        def assetNumber = ExtendedAttributeType.findByName("Asset Number")
     251        def assetCondition = ExtendedAttributeType.findByName("Asset Condition")
     252        def maintenancePercentComplete = ExtendedAttributeType.findByName("Maintenance % Completion")
     253        def registrationRequired = ExtendedAttributeType.findByName("Registration Required")
     254        def registrationExpiryDate =  ExtendedAttributeType.findByName("Registration Expiry Date")
     255        def regulatoryRequirement = ExtendedAttributeType.findByName("Regulatory Requirement")
     256        def riskLevel = ExtendedAttributeType.findByName("Risk Level")
     257        def safeWorkProcedure = ExtendedAttributeType.findByName("Safe Work Procedure")
    258258
    259259        for(asset in assets) {
Note: See TracChangeset for help on using the changeset viewer.