Changeset 582 for trunk/grails-app/services
- Timestamp:
- Jun 8, 2010, 4:28:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskSearchService.groovy
r529 r582 161 161 paginateParams.offset = params?.offset?.toInteger() ?: 0 162 162 163 def sort = "task." + (params?.sort ?: "attentionFlag") 164 def order = params?.order == "asc" ? "asc" : "desc" 165 def orderBy = " order by " + sort + ' ' + order 163 def orderBy = '' 164 if(params.sort?.contains('.')) // protect against filterpane bug. 165 params.sort = null 166 if(params.sort && params.order) { 167 def sort = "task." + params.sort 168 def order = (params.order == "asc") ? "asc" : "desc" 169 orderBy = " order by " + sort + ' ' + order 170 } 171 else 172 orderBy = " order by task.taskStatus, task.taskPriority, task.targetStartDate" 166 173 167 174 def namedParams = [:] … … 198 205 paginateParams.offset = params?.offset?.toInteger() ?: 0 199 206 200 def sort = "task." + (params?.sort ?: "attentionFlag") 201 def order = params?.order == "asc" ? "asc" : "desc" 202 def orderBy = " order by " + sort + ' ' + order 207 def orderBy = '' 208 if(params.sort?.contains('.')) // protect against filterpane bug. 209 params.sort = null 210 if(params.sort && params.order) { 211 def sort = "task." + params.sort 212 def order = (params.order == "asc") ? "asc" : "desc" 213 orderBy = " order by " + sort + ' ' + order 214 } 215 else 216 orderBy = " order by task.taskStatus, task.taskPriority, task.targetStartDate" 203 217 204 218 def namedParams = [:]
Note: See TracChangeset
for help on using the changeset viewer.