diff --git a/devdocs/todo.txt b/devdocs/todo.txt
index c9b55387..6e87c36f 100644
--- a/devdocs/todo.txt
+++ b/devdocs/todo.txt
@@ -80,16 +80,10 @@ TODO CLIENT STUFF
TODO SERVER STUFF
- - TAGS: REally need to have a think about how tags are used in the UI, probably need a autofill route that has a source of used or common tags to drive it
- - so user can type first fiew characters adn select
- - So consistency is maintained and not sloppy multiple spellings
- - Maybe a db stored procedure and trigger or biz code that feeds a consolidated tag table of all entered tags in the system?
- - Maybe a reference count for each tag to drive a tag cloud feature and also a order by commonality feature when offering and also to know when to remove from
- the tag repository when no one is using that tag anymore in any records
-
- - TAG ROUTE: LIST route to fetch tags in Alphabetical order by name based on starts with (or maybe contains) used for quickly autofilling a list at UI level
+
- TAG ROUTE: CLOUD route to fetch tags in order of refcount decreasing
- TAG repo tests: ensure updates delete and add properly, ensure new adds properly, ensure lists work properly
+ - TAG Ref count test:
- Boot server and seed with debug log turned on, see what is being tracked by EF that doesn't need to, seems some of that shit is being tracked.
- Docs: pagingOptions, sort and filter need to be documented for API
diff --git a/server/AyaNova/Controllers/TagPickListController.cs b/server/AyaNova/Controllers/TagPickListController.cs
index d5db49c5..275552aa 100644
--- a/server/AyaNova/Controllers/TagPickListController.cs
+++ b/server/AyaNova/Controllers/TagPickListController.cs
@@ -47,8 +47,8 @@ namespace AyaNova.Api.Controllers
///
/// The query to filter the returned list by
/// List
- [HttpGet("list/{query}")]
- public ActionResult GetPickList([FromRoute]string query)
+ [HttpGet("picklist")]
+ public ActionResult GetPickList([FromQuery]string query)
{
if (!serverState.IsOpen)
{
diff --git a/server/AyaNova/biz/TagUtil.cs b/server/AyaNova/biz/TagUtil.cs
index c4eb8305..3b569bba 100644
--- a/server/AyaNova/biz/TagUtil.cs
+++ b/server/AyaNova/biz/TagUtil.cs
@@ -153,8 +153,17 @@ namespace AyaNova.Biz
//going with contains for now as I think it's more useful in the long run and still captures startswith intent by user
public static List PickListFiltered(AyContext ct, string q)
{
- q = NormalizeTag(q);
- return ct.Tag.Where(x => x.Name.Contains(q)).OrderBy(x => x.Name).Select(x => x.Name).ToList();
+ //This path is intended for internal use and accepts that there may not be a filter specified
+ //however the client will always require a filter to display a tag list for choosing from
+ if (string.IsNullOrWhiteSpace(q))
+ {
+ return ct.Tag.OrderBy(x => x.Name).Select(x => x.Name).ToList();
+ }
+ else
+ {
+ q = NormalizeTag(q);
+ return ct.Tag.Where(x => x.Name.Contains(q)).OrderBy(x => x.Name).Select(x => x.Name).ToList();
+ }
}