Changeset 447


Ignore:
Timestamp:
Mar 17, 2010, 8:44:12 AM (10 years ago)
Author:
gav
Message:

Add constraints to Task domain class for targetCompletionDate and comment, part 2.

File:
1 edited

Legend:

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

    r441 r447  
    829829                description:"Level sensor not working",
    830830                comment:"Has been noted as problematic, try recalibrating.",
    831                 targetStartDate: dateUtilService.today]
     831                targetStartDate: dateUtilService.today,
     832                targetCompletionDate: dateUtilService.today]
    832833
    833834        taskResult = taskService.save(p)
     
    841842                comment:"Some help required",
    842843                targetStartDate: dateUtilService.tomorrow,
     844                targetCompletionDate: dateUtilService.tomorrow,
    843845                parentTask: Task.get(1)]
    844846
     
    853855                comment:"Some help required",
    854856                targetStartDate: dateUtilService.yesterday,
     857                targetCompletionDate: dateUtilService.yesterday,
    855858                parentTask: Task.get(1)]
    856859
     
    864867                 description:"Please replace sensor at next available opportunity.",
    865868                 comment:"Nothing else has worked. So we now require the part to be replaced.",
    866                 targetStartDate: dateUtilService.oneWeekFromNow,
     869                targetStartDate: dateUtilService.today,
     870                targetCompletionDate: dateUtilService.oneWeekFromNow,
    867871                parentTask: Task.get(1)]
    868872
     
    876880                 description:"Production Task",
    877881                 comment:"Production task for specific production run or shift",
    878                 targetStartDate: dateUtilService.today - 6]
     882                targetStartDate: dateUtilService.today - 6,
     883                targetCompletionDate: dateUtilService.today - 6]
    879884
    880885        taskResult = taskService.save(p)
     
    887892                 description:"This is a recurring preventative maintenance task.",
    888893                 comment:"If there is a parent task specified then this is a generated sub task, if there is a recurring schedule specified then this is a parent task.",
    889                 targetStartDate: dateUtilService.today]
     894                targetStartDate: dateUtilService.today,
     895                targetCompletionDate: dateUtilService.today + 30]
    890896
    891897        taskResult = taskService.save(p)
Note: See TracChangeset for help on using the changeset viewer.