Changeset 511


Ignore:
Timestamp:
Apr 28, 2010, 5:02:11 PM (14 years ago)
Author:
gav
Message:

Adjust TaskSearchService.getPersonsTasks() so that if a person created it and is leadPerson then that task is returned.
Started on integration tests for TaskSearchService.

Location:
trunk
Files:
1 added
1 edited

Legend:

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

    r503 r511  
    204204                                        left join assignedGroupOfTask.personGroup as personGroup \
    205205                                        left join personGroup.persons as assignedPersonViaGroup \
     206                                        left join task.taskModifications as taskModification \
     207                                        left join taskModification.person as createdBy \
     208                                        left join taskModification.taskModificationType as taskModificationType \
    206209                                        where (task.trash = false \
    207                                                     and task.approved = true \
     210                                                    and task.targetStartDate < :endDate \
     211                                                    and task.targetCompletionDate >= :startDate \
    208212                                                    and ( \
    209                                                             task.targetStartDate < :endDate \
    210                                                             and task.targetCompletionDate >= :startDate \
     213                                                        (taskModificationType.id = 1 \
     214                                                        and createdBy = :person \
     215                                                        and task.leadPerson = :person) \
     216                                                        or ( \
     217                                                            task.approved = true \
     218                                                            and ( \
     219                                                                task.leadPerson = :person \
     220                                                                or assignedPerson = :person \
     221                                                                or assignedPersonViaGroup = :person \
     222                                                            ) \
    211223                                                        ) \
    212                                                     and ( \
    213                                                             task.leadPerson = :person \
    214                                                             or assignedPerson = :person \
    215                                                             or assignedPersonViaGroup = :person \
    216                                                             ) \
    217                                                     )"
     224                                                    ) \
     225                                        )"
    218226
    219227        def searchQuery = "select distinct task " + baseQuery + orderBy
Note: See TracChangeset for help on using the changeset viewer.