CDR Tickets

Issue Number 4520
Summary [Term] Advanced Search filters not working
Created 2018-09-14 15:22:13
Issue Type Bug
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2019-06-19 17:05:17
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.233121
Description

When doing a wildcard terminology Advanced search, limiting the search by Term Type and/or Semantic Type, produces the same results. Could you please make changes so that those filters are properly applied to searches?

Comment entered 2018-10-15 09:50:13 by Kline, Bob (NIH/NCI) [C]

Found the bug. We can fix it in Ising, though if we have time we should consider overhauling the "Advanced Search" component, partly for stylistic consistency with the rest of the system, but much more importantly for cleanup of code which is obscure and difficult to maintain.

--- a/Inetpub/wwwroot/cgi-bin/cdr/TermSearch.py
+++ b/Inetpub/wwwroot/cgi-bin/cdr/TermSearch.py
@@ -56,7 +56,7 @@ def termTypeList(conn, fName):
         values = [row[0] for row in query.execute(cursor).fetchall()]
     except Exception, e:
         cdrcgi.bail('Failure retrieving term type list from CDR: %s' % e)
-    select = B.SELECT(name="%s")
+    select = B.SELECT(name=fName)
     select.append(B.OPTION(u"\xa0", value="", checked="checked"))
     for value in values:
         select.append(B.OPTION(value + u" \xa0", value=value))
@@ -76,7 +76,7 @@ def semanticTypeList(conn, fName):
         cursor.close()
     except Exception, e:
         cdrcgi.bail('Failure retrieving semantic type list from CDR: %s' % e)
-    select = B.SELECT(name="%s")
+    select = B.SELECT(name=fName)
     select.append(B.OPTION(u"\xa0", value="", checked="checked"))
     for id, title in rows:
         id = cdr.normalize(id)
Comment entered 2019-06-19 17:05:17 by Kline, Bob (NIH/NCI) [C]

Fixed on DEV (without addressing the broader issues, since that suggestion got no response).

https://github.com/NCIOCPL/cdr-admin/commit/8e87ba35

Comment entered 2019-07-05 05:44:26 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV. Thanks!

Comment entered 2019-08-05 14:13:08 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA. Thanks!

Comment entered 2019-09-09 13:52:58 by Osei-Poku, William (NIH/NCI) [C]

Verified on PROD. Thanks!

Elapsed: 0:00:00.001158