Skip to content

Commit

Permalink
Merge pull request #5338 from bcgov/dev-rook-NK-FOIMOD-3184
Browse files Browse the repository at this point in the history
minor bug fix for historical search sorting
  • Loading branch information
nkan-aot2 authored Jul 24, 2024
2 parents 2aabf55 + ab18bd1 commit e1736cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ export const fetchHistoricalSearchData = ({
// sortingOrders.push(item.sort);
// });

if (sort[0].field === 'axisrequestid') {
sort[0].field = 'visualrequestfilenumber'
}

httpGETRequest(
API.FOI_HISTORICAL_SEARCH_API,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ def getadvancedsearchresults(cls,isiaorestictedmanager:False, params):
if(isiaorestictedmanager == False):
basequery+= " AND requesttypename NOT LIKE '%Restricted%'"

if params['sortingitem'] == 'axisrequestid':
params['sortingitem'] = 'visualrequestfilenumber'
elif params['sortingitem'] == 'requesttype':
params['sortingitem'] = 'requesttype'

basequery+= ' ORDER BY {0} {1}'.format(params['sortingitem'],params['sortingorder'])

if params['size'] is not None:
Expand Down

0 comments on commit e1736cc

Please sign in to comment.