Index: trunk/grails-app/conf/Config.groovy
===================================================================
--- trunk/grails-app/conf/Config.groovy	(revision 430)
+++ trunk/grails-app/conf/Config.groovy	(revision 431)
@@ -297,4 +297,12 @@
             [order:91, controller:'departmentDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
         ]
+    ],
+    [order:160, controller:'productionReferenceDetailed', title:'productionReference', action:'list',
+        subItems: [
+            [order:10, controller:'productionReferenceDetailed', title:'Production Reference List', action:'list', isVisible: { true }],
+            [order:20, controller:'productionReferenceDetailed', title:'Create', action:'create', isVisible: { true }],
+            [order:90, controller:'productionReferenceDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }],
+            [order:91, controller:'productionReferenceDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
+        ]
     ]
 ]
Index: trunk/grails-app/controllers/ProductionReferenceDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/ProductionReferenceDetailedController.groovy	(revision 431)
+++ trunk/grails-app/controllers/ProductionReferenceDetailedController.groovy	(revision 431)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_AppAdmin', 'ROLE_Manager'])
+class ProductionReferenceDetailedController extends BaseController {
+
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ productionReferenceInstanceList: ProductionReference.list( params ), productionReferenceInstanceTotal: ProductionReference.count() ]
+    }
+
+    def show = {
+        def productionReferenceInstance = ProductionReference.get( params.id )
+
+        if(!productionReferenceInstance) {
+            flash.message = "ProductionReference not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ productionReferenceInstance : productionReferenceInstance ] }
+    }
+
+    def delete = {
+        def productionReferenceInstance = ProductionReference.get( params.id )
+        if(productionReferenceInstance) {
+            try {
+                productionReferenceInstance.delete(flush:true)
+                flash.message = "ProductionReference ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "ProductionReference ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "ProductionReference not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def productionReferenceInstance = ProductionReference.get( params.id )
+
+        if(!productionReferenceInstance) {
+            flash.message = "ProductionReference not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ productionReferenceInstance : productionReferenceInstance ]
+        }
+    }
+
+    def update = {
+        def productionReferenceInstance = ProductionReference.get( params.id )
+        if(productionReferenceInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(productionReferenceInstance.version > version) {
+                    
+                    productionReferenceInstance.errors.rejectValue("version", "default.optimistic.locking.failure")
+                    render(view:'edit',model:[productionReferenceInstance:productionReferenceInstance])
+                    return
+                }
+            }
+            productionReferenceInstance.properties = params
+            if(!productionReferenceInstance.hasErrors() && productionReferenceInstance.save(flush: true)) {
+                flash.message = "ProductionReference ${params.id} updated"
+                redirect(action:show,id:productionReferenceInstance.id)
+            }
+            else {
+                render(view:'edit',model:[productionReferenceInstance:productionReferenceInstance])
+            }
+        }
+        else {
+            flash.message = "ProductionReference not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def productionReferenceInstance = new ProductionReference()
+        productionReferenceInstance.properties = params
+        return ['productionReferenceInstance':productionReferenceInstance]
+    }
+
+    def save = {
+        def productionReferenceInstance = new ProductionReference(params)
+        if(!productionReferenceInstance.hasErrors() && productionReferenceInstance.save(flush: true)) {
+            flash.message = "ProductionReference ${productionReferenceInstance.id} created"
+            redirect(action:show,id:productionReferenceInstance.id)
+        }
+        else {
+            render(view:'create',model:[productionReferenceInstance:productionReferenceInstance])
+        }
+    }
+}
Index: trunk/grails-app/domain/Entry.groovy
===================================================================
--- trunk/grails-app/domain/Entry.groovy	(revision 430)
+++ trunk/grails-app/domain/Entry.groovy	(revision 431)
@@ -3,4 +3,6 @@
     Task task
     EntryType entryType
+    ProductionReference productionReference
+
     String comment
     Date dateDone = new Date()
@@ -17,5 +19,5 @@
         durationHour(min:0,max:16)
         durationMinute(min:0,max:59)
-        
+        productionReference(nullable: true)
     }
 
Index: trunk/grails-app/domain/ProductionReference.groovy
===================================================================
--- trunk/grails-app/domain/ProductionReference.groovy	(revision 431)
+++ trunk/grails-app/domain/ProductionReference.groovy	(revision 431)
@@ -0,0 +1,20 @@
+class ProductionReference {
+
+    String name
+    String description = ""
+    Boolean isActive = true
+
+//     static hasMany = []
+
+//     static belongsTo = []
+
+    static constraints = {
+        name(maxSize:50, unique:true, blank:false)
+        description(maxSize:75)
+        isActive()
+    }
+
+    String toString() {
+        "${this.name}"
+    }
+}
Index: trunk/grails-app/i18n/messages.properties
===================================================================
--- trunk/grails-app/i18n/messages.properties	(revision 430)
+++ trunk/grails-app/i18n/messages.properties	(revision 431)
@@ -56,9 +56,10 @@
 entry.duration=Duration
 entry.duration.help=The time (hh:mm) booked against this entry for date done.
+entry.duration.fault=Down Time.
+entry.duration.fault.help=The production down time directly attributable to this fault.
 entry.date.done=Date Done
 entry.date.done.help=The date on which the event actually occurred.
 entry.comment.fault=Fault
-entry.comment.fault.help=Describe the fault and what is happening, NOT what needs doing! \
-<br /><br />From an operation perspective, NOT a technical perspective.
+entry.comment.fault.help=Describe the fault and what is happening, NOT what needs doing!
 entry.comment.cause=Cause
 entry.comment.cause.help=The root cause of the fault. Professional opinion on any faults. \
@@ -66,4 +67,6 @@
 entry.comment.work.done=Work Done
 entry.comment.work.done.help=Describe the work that was done.
+entry.productionReference.fault=Production Reference
+entry.productionReference.fault.help=The production during which the fault occurred.
 
 assignedGroup.estimatedDuration=Estimated Duration
@@ -94,12 +97,22 @@
 task.description=Task Description
 task.description.help=Short basic description of the task.
+task.description.immediateCallout=Immediate Callout Description.
+task.description.immediateCallout.help=Short description of the callout.
 task.comment=Task Comment
 task.comment.help=Long text for additional info, only shown in detail views.
 task.targetStartDate=Target Start Date
 task.targetStartDate.help=The date we would like the task to start, set during scheduling.
+task.targetStartDate.immediateCallout=Callout Date
+task.targetStartDate.immediateCallout.help=The date the callout occured.
 task.targetCompletionDate=Target Completion Date
 task.targetCompletionDate.help=The date we would like the task to be completed by, set during scheduling.
 task.leadPerson=Lead Person
 task.leadPerson.help=The primay contact person.
+task.status.resolved=Resolved.
+task.status.resolved.help=Indicate that all faults and causes have been completely resolved and there is \
+    no further work to be carried out.
+task.status.unresolved=Unresolved.
+task.status.unresolved.help=Indicate that this task requires further attention and there is further \
+    work to be carried out.
 
 taskRecurringSchedule.nextTargetStartDate.mayNotBePast=Please select a start date that is not in the past.
@@ -132,4 +145,5 @@
 default.close.text=Close
 default.options.text=Options
+default.none.text=None
 
 default.list.failure=Could not generate list for class {0}.
Index: trunk/grails-app/services/CreateDataService.groovy
===================================================================
--- trunk/grails-app/services/CreateDataService.groovy	(revision 430)
+++ trunk/grails-app/services/CreateDataService.groovy	(revision 431)
@@ -112,4 +112,5 @@
         createDemoSuppliers()
         createDemoManufacturers()
+        createDemoProductionReference()
 
         // Tasks
@@ -146,5 +147,6 @@
 
         // Authority #1
-        authInstance = new Authority(description:"Application Admin, not required for daily use! Grants full admin access to the application.",
+        authInstance = new Authority(description:"Application Admin, not required for daily use! \
+                                                                                Grants full admin access to the application.",
                                         authority:"ROLE_AppAdmin")
         saveAndTest(authInstance)
@@ -157,40 +159,51 @@
         // Authority #2
         authInstance = new Authority(description:"Business Manager, grants full management access.",
-                                        authority:"ROLE_Manager")
+                                                            authority:"ROLE_Manager")
         saveAndTest(authInstance)
 
         // Authority #3
-        authInstance = new Authority(description:"Application User, all application users need this base role to allow login.",
-                                        authority:"ROLE_AppUser")
+        authInstance = new Authority(description:"Application User, all application users need this base role \
+                                                                                    to allow login.",
+                                                            authority:"ROLE_AppUser")
         saveAndTest(authInstance)
 
         // Authority #4
         authInstance = new Authority(description:"Task Manager",
-                                        authority:"ROLE_TaskManager")
+                                                            authority:"ROLE_TaskManager")
         saveAndTest(authInstance)
 
         // Authority #5
         authInstance = new Authority(description:"Task User",
-                                        authority:"ROLE_TaskUser")
+                                                            authority:"ROLE_TaskUser")
         saveAndTest(authInstance)
 
         // Authority #6
         authInstance = new Authority(description:"Inventory Manager",
-                                        authority:"ROLE_InventoryManager")
+                                                            authority:"ROLE_InventoryManager")
         saveAndTest(authInstance)
 
         // Authority #7
         authInstance = new Authority(description:"Inventory User",
-                                        authority:"ROLE_InventoryUser")
+                                                            authority:"ROLE_InventoryUser")
         saveAndTest(authInstance)
 
         // Authority #8
         authInstance = new Authority(description:"Asset Manager",
-                                        authority:"ROLE_AssetManager")
+                                                            authority:"ROLE_AssetManager")
         saveAndTest(authInstance)
 
         // Authority #9
         authInstance = new Authority(description:"Asset User",
-                                        authority:"ROLE_AssetUser")
+                                                            authority:"ROLE_AssetUser")
+        saveAndTest(authInstance)
+
+        // Authority #10
+        authInstance = new Authority(description:"Production Manager",
+                                                            authority:"ROLE_ProductionManager")
+        saveAndTest(authInstance)
+
+        // Authority #11
+        authInstance = new Authority(description:"Production User",
+                                                            authority:"ROLE_ProductionUser")
         saveAndTest(authInstance)
     }
@@ -279,7 +292,6 @@
                                     password:passwordEncoded)
         saveAndTest(personInstance)
-        personInstance.addToAuthorities(Authority.get(2))
-        personInstance.addToAuthorities(Authority.get(3))
-        personInstance.addToPersonGroups(PersonGroup.get(5))
+        personInstance.addToAuthorities(Authority.get(2)) // ROLE_Manager.
+        personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser.
 
         //Person #4
@@ -290,8 +302,8 @@
                                     password:passwordEncoded)
         saveAndTest(personInstance)
-        personInstance.addToAuthorities(Authority.get(3))
-        personInstance.addToAuthorities(Authority.get(5))
-        personInstance.addToAuthorities(Authority.get(7))
-        personInstance.addToAuthorities(Authority.get(9))
+        personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser.
+        personInstance.addToAuthorities(Authority.get(5)) // ROLE_TaskManager.
+        personInstance.addToAuthorities(Authority.get(7)) // ROLE_InventoryUser.
+        personInstance.addToAuthorities(Authority.get(9)) // ROLE_AssetUser.
         personInstance.addToPersonGroups(PersonGroup.get(1))
 
@@ -323,15 +335,26 @@
 
         //Person #7
-        personInstance = new Person(loginName:"mann",
+        personInstance = new Person(loginName:"production manager",
                                     firstName:"Production",
-                                    lastName:"Mann",
+                                    lastName:"Manager",
                                     pass:passClearText,
                                     password:passwordEncoded)
         saveAndTest(personInstance)
-        personInstance.addToAuthorities(Authority.get(3))
-        personInstance.addToAuthorities(Authority.get(5))
+        personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser.
+        personInstance.addToAuthorities(Authority.get(10)) // ROLE_ProductionManager.
         personInstance.addToPersonGroups(PersonGroup.get(3))
 
-        //Person #7
+        //Person #8
+        personInstance = new Person(loginName:"production",
+                                    firstName:"Production",
+                                    lastName:"User",
+                                    pass:passClearText,
+                                    password:passwordEncoded)
+        saveAndTest(personInstance)
+        personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser.
+        personInstance.addToAuthorities(Authority.get(11)) // ROLE_ProductionUser.
+        personInstance.addToPersonGroups(PersonGroup.get(3))
+
+        //Person #9
         personInstance = new Person(loginName:"testmanager",
                                     firstName:"Test",
@@ -340,8 +363,8 @@
                                     password:passwordEncoded)
         saveAndTest(personInstance)
-        personInstance.addToAuthorities(Authority.get(3))
-        personInstance.addToAuthorities(Authority.get(4))
-        personInstance.addToAuthorities(Authority.get(6))
-        personInstance.addToAuthorities(Authority.get(8))
+        personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser.
+        personInstance.addToAuthorities(Authority.get(4)) // ROLE_TaskManager.
+        personInstance.addToAuthorities(Authority.get(6)) // ROLE_InventoryManager.
+        personInstance.addToAuthorities(Authority.get(8)) // ROLE_AssetManager.
         personInstance.addToPersonGroups(PersonGroup.get(3))
     }
@@ -621,4 +644,18 @@
     }
 
+    def createDemoProductionReference() {
+
+        // ProductionReference
+        def productionReferenceInstance
+
+        // ProductionReference #1
+        productionReferenceInstance = new ProductionReference(name: "Monday Production")
+        saveAndTest(productionReferenceInstance)
+
+        // ProductionReference #2
+        productionReferenceInstance = new ProductionReference(name: "Tuesday Production")
+        saveAndTest(productionReferenceInstance)
+    }
+
 /*********************
 START OF TASK
Index: trunk/grails-app/services/TaskService.groovy
===================================================================
--- trunk/grails-app/services/TaskService.groovy	(revision 430)
+++ trunk/grails-app/services/TaskService.groovy	(revision 431)
@@ -688,7 +688,12 @@
             }
 
+            def productionReference
+            if(params.entryFault.productionReference.id.isLong())
+                productionReference = ProductionReference.get(params.entryFault.productionReference.id.toLong())
+
             def faultParams = [task: result.taskInstance,
                                             entryType: EntryType.get(1),
                                             comment: params.entryFault.comment,
+                                            productionReference: productionReference,
                                             durationHour: params.entryFault.durationHour,
                                             durationMinute: params.entryFault.durationMinute]
Index: trunk/grails-app/views/entryDetailed/create.gsp
===================================================================
--- trunk/grails-app/views/entryDetailed/create.gsp	(revision 430)
+++ trunk/grails-app/views/entryDetailed/create.gsp	(revision 431)
@@ -60,8 +60,25 @@
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}">
-                                    <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${new Date()}" />
+                                    <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${entryInstance.dateDone}" />
                                     <g:helpBalloon code="entry.date.done" />
                                 </td>
                             </tr>
+
+                            <g:if test="${entryInstance?.entryType?.id == 1}">
+                                <tr class="prop">
+                                    <td valign="top" class="name">
+                                        <label for="productionReference">Production:</label>
+                                    </td>
+                                    <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}">
+                                        <g:select optionKey="id"
+                                                            from="${ProductionReference.findAllByIsActive(true)}"
+                                                            name="productionReference.id"
+                                                            value="${entryInstance.productionReference?.id}"
+                                                            noSelection="['null':'--None--']">
+                                        </g:select>
+                                        <g:helpBalloon code="entry.productionReference.fault" />
+                                    </td>
+                                </tr>
+                            </g:if>
                         
                             <tr class="prop">
Index: trunk/grails-app/views/entryDetailed/edit.gsp
===================================================================
--- trunk/grails-app/views/entryDetailed/edit.gsp	(revision 430)
+++ trunk/grails-app/views/entryDetailed/edit.gsp	(revision 431)
@@ -55,4 +55,21 @@
                                 </td>
                             </tr>
+
+                            <g:if test="${entryInstance?.entryType?.id == 1}">
+                                <tr class="prop">
+                                    <td valign="top" class="name">
+                                        <label for="productionReference">Production:</label>
+                                    </td>
+                                    <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}">
+                                        <g:select optionKey="id"
+                                                            from="${ProductionReference.findAllByIsActive(true)}"
+                                                            name="productionReference.id"
+                                                            value="${entryInstance.productionReference?.id}"
+                                                            noSelection="['null':'--None--']">
+                                        </g:select>
+                                        <g:helpBalloon code="entry.productionReference.fault" />
+                                    </td>
+                                </tr>
+                            </g:if>
                         
                             <tr class="prop">
Index: trunk/grails-app/views/entryDetailed/show.gsp
===================================================================
--- trunk/grails-app/views/entryDetailed/show.gsp	(revision 430)
+++ trunk/grails-app/views/entryDetailed/show.gsp	(revision 431)
@@ -49,4 +49,15 @@
                             
                         </tr>
+
+                        <g:if test="${entryInstance.productionReference}">
+                            <tr class="prop">
+                                <td valign="top" class="name">Production:</td>
+
+                                <td valign="top" class="value">
+                                    ${fieldValue(bean:entryInstance, field:'productionReference')}
+                                </td>
+
+                            </tr>
+                        </g:if>
                     
                         <tr class="prop">
Index: trunk/grails-app/views/productionReferenceDetailed/create.gsp
===================================================================
--- trunk/grails-app/views/productionReferenceDetailed/create.gsp	(revision 431)
+++ trunk/grails-app/views/productionReferenceDetailed/create.gsp	(revision 431)
@@ -0,0 +1,62 @@
+
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <meta name="layout" content="main" />
+        <title>Create ProductionReference</title>
+        <nav:resources override="true"/>
+    </head>
+    <body>
+        <div class="nav">
+            <nav:renderSubItems group="navAlt"/>
+        </div>
+        <div class="body">
+            <g:render template="/shared/messages" />
+            <g:hasErrors bean="${productionReferenceInstance}">
+            <div class="errors">
+                <g:renderErrors bean="${productionReferenceInstance}" as="list" />
+            </div>
+            </g:hasErrors>
+            <g:form action="save" method="post" >
+                <div class="dialog">
+                    <table>
+                        <tbody>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="name">Name:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:productionReferenceInstance,field:'name','errors')}">
+                                    <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:productionReferenceInstance,field:'name')}"/>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="description">Description:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:productionReferenceInstance,field:'description','errors')}">
+                                    <input type="text" maxlength="75" id="description" name="description" value="${fieldValue(bean:productionReferenceInstance,field:'description')}"/>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="isActive">Is Active:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:productionReferenceInstance,field:'isActive','errors')}">
+                                    <g:checkBox name="isActive" value="${productionReferenceInstance?.isActive}" ></g:checkBox>
+                                </td>
+                            </tr> 
+                        
+                        </tbody>
+                    </table>
+                </div>
+                <div class="buttons">
+                    <span class="button"><input class="save" type="submit" value="Create" /></span>
+                </div>
+            </g:form>
+        </div>
+    </body>
+</html>
Index: trunk/grails-app/views/productionReferenceDetailed/edit.gsp
===================================================================
--- trunk/grails-app/views/productionReferenceDetailed/edit.gsp	(revision 431)
+++ trunk/grails-app/views/productionReferenceDetailed/edit.gsp	(revision 431)
@@ -0,0 +1,66 @@
+
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <meta name="layout" content="main" />
+        <title>Edit ProductionReference</title>
+        <nav:resources override="true"/>
+    </head>
+    <body>
+        <div class="nav">
+            <nav:renderSubItems group="navAlt"/>
+        </div>
+        <div class="body">
+            <g:render template="/shared/messages" />
+            <g:hasErrors bean="${productionReferenceInstance}">
+            <div class="errors">
+                <g:renderErrors bean="${productionReferenceInstance}" as="list" />
+            </div>
+            </g:hasErrors>
+            <g:form method="post" >
+                <input type="hidden" name="id" value="${productionReferenceInstance?.id}" />
+                <input type="hidden" name="version" value="${productionReferenceInstance?.version}" />
+                <div class="dialog">
+                    <table>
+                        <tbody>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="name">Name:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:productionReferenceInstance,field:'name','errors')}">
+                                    <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:productionReferenceInstance,field:'name')}"/>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="description">Description:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:productionReferenceInstance,field:'description','errors')}">
+                                    <input type="text" maxlength="75" id="description" name="description" value="${fieldValue(bean:productionReferenceInstance,field:'description')}"/>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="isActive">Is Active:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:productionReferenceInstance,field:'isActive','errors')}">
+                                    <g:checkBox name="isActive" value="${productionReferenceInstance?.isActive}" ></g:checkBox>
+                                </td>
+                            </tr> 
+                        
+                        </tbody>
+                    </table>
+                </div>
+                <div class="buttons">
+                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
+                    <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span>
+                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
+                </div>
+            </g:form>
+        </div>
+    </body>
+</html>
Index: trunk/grails-app/views/productionReferenceDetailed/list.gsp
===================================================================
--- trunk/grails-app/views/productionReferenceDetailed/list.gsp	(revision 431)
+++ trunk/grails-app/views/productionReferenceDetailed/list.gsp	(revision 431)
@@ -0,0 +1,61 @@
+
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <meta name="layout" content="main" />
+        <title>ProductionReference List</title>
+        <nav:resources override="true"/>
+    </head>
+    <body>
+        <div class="nav">
+            <nav:renderSubItems group="navAlt"/>
+        </div>
+        <div class="body">
+            <g:render template="/shared/messages" />
+            <div class="list">
+                <table>
+                    <thead>
+                        <tr>
+                        
+                   	        <g:sortableColumn property="id" title="Id" />
+                        
+                   	        <g:sortableColumn property="name" title="Name" />
+                        
+                   	        <g:sortableColumn property="description" title="Description" />
+                        
+                   	        <g:sortableColumn property="isActive" title="Is Active" />
+
+                            <th></th>
+                        
+                        </tr>
+                    </thead>
+                    <tbody>
+                    <g:each in="${productionReferenceInstanceList}" status="i" var="productionReferenceInstance">
+                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/productionReferenceDetailed/show/${productionReferenceInstance.id}"'/>
+                        
+                            <td>${fieldValue(bean:productionReferenceInstance, field:'id')}</td>
+                        
+                            <td>${fieldValue(bean:productionReferenceInstance, field:'name')}</td>
+                        
+                            <td>${fieldValue(bean:productionReferenceInstance, field:'description')}</td>
+                        
+                            <td>${fieldValue(bean:productionReferenceInstance, field:'isActive')}</td>
+
+                            <td>
+                                <g:link action="show" id="${productionReferenceInstance.id}">
+                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
+                                </g:link>
+                            </td>
+                        
+                        </tr>
+                    </g:each>
+                    </tbody>
+                </table>
+            </div>
+            <div class="paginateButtons">
+                <g:paginate total="${productionReferenceInstanceTotal}" />
+            </div>
+        </div>
+    </body>
+</html>
Index: trunk/grails-app/views/productionReferenceDetailed/show.gsp
===================================================================
--- trunk/grails-app/views/productionReferenceDetailed/show.gsp	(revision 431)
+++ trunk/grails-app/views/productionReferenceDetailed/show.gsp	(revision 431)
@@ -0,0 +1,61 @@
+
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <meta name="layout" content="main" />
+        <title>Show ProductionReference</title>
+        <nav:resources override="true"/>
+    </head>
+    <body>
+        <div class="nav">
+            <nav:renderSubItems group="navAlt"/>
+        </div>
+        <div class="body">
+            <g:render template="/shared/messages" />
+            <div class="dialog">
+                <table>
+                    <tbody>
+
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Id:</td>
+                            
+                            <td valign="top" class="value">${fieldValue(bean:productionReferenceInstance, field:'id')}</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Name:</td>
+                            
+                            <td valign="top" class="value">${fieldValue(bean:productionReferenceInstance, field:'name')}</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Description:</td>
+                            
+                            <td valign="top" class="value">${fieldValue(bean:productionReferenceInstance, field:'description')}</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Is Active:</td>
+                            
+                            <td valign="top" class="value">${fieldValue(bean:productionReferenceInstance, field:'isActive')}</td>
+                            
+                        </tr>
+                    
+                    </tbody>
+                </table>
+            </div>
+            <div class="buttons">
+                <g:form>
+                    <input type="hidden" name="id" value="${productionReferenceInstance?.id}" />
+                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
+                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
+                </g:form>
+            </div>
+        </div>
+    </body>
+</html>
Index: trunk/grails-app/views/taskDetailed/createImmediateCallout.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/createImmediateCallout.gsp	(revision 430)
+++ trunk/grails-app/views/taskDetailed/createImmediateCallout.gsp	(revision 431)
@@ -13,23 +13,22 @@
         <div class="body">
             <g:render template="/shared/messages" />
-            <g:hasErrors bean="${taskInstance}">
-            <div class="errors">
-                <g:renderErrors bean="${taskInstance}" as="list" />
-            </div>
-            </g:hasErrors>
-            <g:hasErrors bean="${entryFaultInstance}">
-            <div class="errors">
-                <g:renderErrors bean="${entryFaultInstance}" as="list" />
-            </div>
-            </g:hasErrors>
-            <g:hasErrors bean="${entryCauseInstance}">
-            <div class="errors">
-                <g:renderErrors bean="${entryCauseInstance}" as="list" />
-            </div>
-            </g:hasErrors>
-            <g:hasErrors bean="${entryWorkDoneInstance}">
-            <div class="errors">
-                <g:renderErrors bean="${entryWorkDoneInstance}" as="list" />
-            </div>
+
+            <g:hasErrors>
+                <div class="errors">
+                    <ul>
+                        <g:eachError bean="${taskInstance}">
+                            <li><g:message error="${it}" /></li>
+                        </g:eachError>
+                        <g:eachError bean="${entryFaultInstance}">
+                            <li><g:message error="${it}" /></li>
+                        </g:eachError>
+                        <g:eachError bean="${entryCauseInstance}">
+                            <li><g:message error="${it}" /></li>
+                        </g:eachError>
+                        <g:eachError bean="${entryWorkDoneInstance}">
+                            <li><g:message error="${it}" /></li>
+                        </g:eachError>
+                    </ul>
+                </div>
             </g:hasErrors>
 
@@ -45,5 +44,40 @@
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}">
                                     <input type="text"  class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/>
-                                    <g:helpBalloon class="helpballoon" code="task.description" />
+                                    <g:helpBalloon class="helpballoon" code="task.description.immediateCallout" />
+                                </td>
+                            </tr>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="targetStartDate">Date:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}">
+                                    <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance.targetStartDate}" />
+                                    <g:helpBalloon class="helpballoon" code="task.targetStartDate.immediateCallout" />
+                                </td>
+                            </tr>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="primaryAsset">Asset:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}">
+                                    <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select>
+                                    <g:helpBalloon code="task.primaryAsset" />
+                                </td>
+                            </tr>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="productionReference">Production:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:entryFaultInstance,field:'productionReference','errors')}">
+                                    <g:select optionKey="id"
+                                                        from="${ProductionReference.findAllByIsActive(true)}"
+                                                        name="entryFault.productionReference.id"
+                                                        value="${entryFaultInstance?.productionReference?.id}"
+                                                        noSelection="['null':'--None--']">
+                                    </g:select>
+                                    <g:helpBalloon code="entry.productionReference.fault" />
                                 </td>
                             </tr>
@@ -62,5 +96,5 @@
                                         type="text" id="entryFault.durationMinute" name="entryFault.durationMinute" 
                                         value="${fieldValue(bean:entryFaultInstance,field:'durationMinute')}" />
-                                    <g:helpBalloon code="entry.duration" />
+                                    <g:helpBalloon code="entry.duration.fault" />
                                 </td> 
                             </tr>
@@ -113,27 +147,4 @@
                             </tr>
                         
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="primaryAsset">Primary Asset:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}">
-                                    <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select>
-                                    <g:helpBalloon code="task.primaryAsset" />
-                                </td>
-                            </tr>
-
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="associatedAssets">Associated Assets:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}">
-                                    <g:select id="associatedAssets" name="associatedAssets"
-                                                    from="${Asset.list()}"
-                                                    size="5" multiple="yes" optionKey="id"
-                                                    value="${taskInstance?.associatedAssets?.id}"  noSelection="['':'--None--']"/>
-                                    <g:helpBalloon code="task.associatedAssets" />
-                                </td>
-                            </tr>
-                        
                         </tbody>
                     </table>
Index: trunk/grails-app/views/taskDetailed/show.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/show.gsp	(revision 430)
+++ trunk/grails-app/views/taskDetailed/show.gsp	(revision 431)
@@ -62,5 +62,9 @@
                                             <td valign="top" class="name">Parent Task:</td>
 
-                                            <td valign="top" class="value"><g:link controller="taskDetailed" action="show" id="${taskInstance.parentTask.id}">${taskInstance.parentTask.encodeAsHTML()}</g:link></td>
+                                            <td valign="top" class="value">
+                                                <g:link controller="taskDetailed" action="show" id="${taskInstance.parentTask.id}">
+                                                    ${taskInstance.parentTask.encodeAsHTML()}
+                                                </g:link>
+                                            </td>
 
                                         </tr>
@@ -77,5 +81,7 @@
                                         <td valign="top" class="name">Target Start:</td>
 
-                                        <td valign="top" class="value"><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td>
+                                        <td valign="top" class="value">
+                                            <g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/>
+                                        </td>
 
                                     </tr>
@@ -84,5 +90,7 @@
                                         <td valign="top" class="name">Target Completion:</td>
 
-                                        <td valign="top" class="value"><g:formatDate date="${taskInstance.targetCompletionDate}" format="EEE, dd-MMM-yyyy"/></td>
+                                        <td valign="top" class="value">
+                                            <g:formatDate date="${taskInstance.targetCompletionDate}" format="EEE, dd-MMM-yyyy"/>
+                                        </td>
 
                                     </tr>
@@ -236,7 +244,9 @@
                                         <g:else>
                                             <span class="button"><g:actionSubmit class="flag" value="Unresolved" action="setAttentionFlag"/></span>
+                                            <g:helpBalloon class="helpballoon" code="task.status.unresolved" />
                                         </g:else>
 
                                         <span class="button"><g:actionSubmit class="complete" value="Resolved" action="complete"/></span>
+                                        <g:helpBalloon class="helpballoon" code="task.status.resolved" />
 
                                         <g:if test="${taskInstance.approved}" >
@@ -272,5 +282,6 @@
                                         <tr>
                                             <th>Comment</th>
-                                            <th>Date Done</th>
+                                            <th>Date</th>
+                                            <th>Production</th>
                                             <th>Down Time</th>
                                             <th>Entered By</th>
@@ -282,8 +293,16 @@
                                                 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
 
-                                                    <td style="width:65%">${entry.comment}</td>
+                                                    <td style="width:65%">${entry.comment.encodeAsHTML()}</td>
                                                     <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td>
+                                                    <td>
+                                                        <g:if test="${entry.productionReference}">
+                                                            ${entry.productionReference.encodeAsHTML()}
+                                                        </g:if>
+                                                        <g:else>
+                                                            <g:message code="default.none.text" />
+                                                        </g:else>
+                                                    </td>
                                                     <td>${entry.durationHour}:${entry.durationMinute}</td>
-                                                    <td>${entry.enteredBy}</td>
+                                                    <td>${entry.enteredBy.encodeAsHTML()}</td>
 
                                                     <td>
@@ -332,7 +351,7 @@
                                                 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
 
-                                                    <td style="width:65%">${entry.comment}</td>
+                                                    <td style="width:65%">${entry.comment.encodeAsHTML()}</td>
                                                     <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td>
-                                                    <td>${entry.enteredBy}</td>
+                                                    <td>${entry.enteredBy.encodeAsHTML()}</td>
 
                                                     <td>
@@ -382,8 +401,8 @@
                                                 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
 
-                                                    <td width="65%">${entry.comment}</td>
+                                                    <td width="65%">${entry.comment.encodeAsHTML()}</td>
                                                     <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td>
                                                     <td>${entry.durationHour}:${entry.durationMinute}</td>
-                                                    <td>${entry.enteredBy}</td>
+                                                    <td>${entry.enteredBy.encodeAsHTML()}</td>
 
                                                     <td>
