Changeset 169


Ignore:
Timestamp:
Oct 27, 2009, 8:53:58 AM (10 years ago)
Author:
gav
Message:

Fix looping bug when a parentTask is selected from a task that is already a subTask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r165 r169  
    241241        if(params._action_Edit)
    242242        { params.action='edit' }
    243        
     243
    244244        def taskInstance = Task.get( params.id )
    245245
     
    250250        else {
    251251            def criteria = taskInstance.createCriteria()
    252             def result = criteria {
     252            def possibleParentList = criteria {
    253253                and {
    254254                    notEqual('id', taskInstance.id)
     255                    taskInstance.subTasks.each() { notEqual('id', it.id) }
    255256                    }
    256257            }
    257             return [ taskInstance : taskInstance, possibleParentList: result ]
     258            return [ taskInstance : taskInstance, possibleParentList: possibleParentList ]
    258259        }
    259260    }
Note: See TracChangeset for help on using the changeset viewer.