When starting the Codex Search UI, do not search for cql.allRecords=1
Description
Environment
Potential Workaround
Checklist
hideTestRail: Results
Activity
Mike Taylor January 12, 2018 at 11:18 AM
Filed https://folio-org.atlassian.net/browse/UISE-48#icft=UISE-48 for the further work; closing this one.
Mike Taylor January 12, 2018 at 11:15 AM
That new issue was https://folio-org.atlassian.net/browse/STSMACOM-46#icft=STSMACOM-46, which I fixed yesterday. Since all that remains of the present issue is #2 ("Once you have performed a search that finds some records, returning to a blank query does not clear the results of that search") – and since that is a potentially difficult issue that may require changes to how stripes-connect works – I am going to close this one, and file that as its own issue.
Mike Taylor January 11, 2018 at 4:25 PM
New issue forthcoming for the first of these, because I also want to display a different message again when something has actually failed.
Mike Taylor January 11, 2018 at 4:06 PM
This is sort of working in the https://folio-org.atlassian.net/browse/UISE-41#icft=UISE-41 branch now. Two problems, though.
1. The records area shows "Loading..." instead of being blank.
2. Once you have performed a search that finds some records, returning to a blank query does not clear the results of that search.
Not sure yet whether to file these as their own issues.
Mike Taylor January 10, 2018 at 11:54 AM
In a discussion on Slack a couple of days ago, Adam argued that we don't need to have the Codex modules support cql.allRecords
, on the basis that you can get the same effect by just omitting the query from the WSAPI request.
That is true when the query is only cql.allRecords=1
, but omitting the query gives us no way to specify a sort-order.
When ui-search starts up, its initial search is cql.allRecords=1 sortby title
, which of course intends to list all records, sorted by title. If we want to support this (as all the other UI modules do – Users, Items, Inventory, Requests), then we will need cql.allRecords
down the line.
However, it's pretty clear that, even though mod-codex-inventory could support it easily enough, mod-codex-ekb won't do so until the forthcoming complete rewrite, so we do need to proceed with the present issue.
I said in the issue description that I wasn't sure whether to have the initial GET omit the query, or to have the module not display any records at all. I now think we need to take the latter approach, since the former would result in a useless unsorted list of records.
I'm not sure yet whether the way to do this is to have the GET not include a
query
at all (which I think would require some changes further down the code stack) or to have it not display any records at all (which may be what the EBSCO KB people prefer).