Opened 5 years ago
Closed 4 years ago
#2476 closed defect (fixed)
The code for Cart Type is not coming up correctly in the Get Web User Cart dataview
| Reported by: | Mark J. Millard | Owned by: | Benjamin Haag |
|---|---|---|---|
| Priority: | critical | Milestone: | Next Release - Server |
| Component: | Public Website App. | Version: | N/A |
| Severity: | Keywords: | get_web_user_cart web_user_cart.cart_type_code code_value.value | |
| Cc: | kurt.endress@…, benjamin.haag@…, laura.gu@…, karen.kittell@… | Database Engine: | N/A |
| Operating System: | N/A |
Description
In the search tool, I cannot query on cart type "favorite" The drop down showing Favorite brings no web order cart records up, but if I use not equal (<> 'Order Items') then the Cart Type "favorites" comes up. The dataview or the code has a problem.
Attachments (2)
Change History (11)
by , 5 years ago
| Attachment: | Ticket cart type error 2476 2022-02-17_11-55-51.png added |
|---|
comment:1 by , 4 years ago
| Cc: | added |
|---|---|
| Component: | Dataviews → Public Website App. |
| Keywords: | web_user_cart.cart_type_code code_value.value added |
| Milestone: | → Next Release - Server |
| Owner: | changed from to |
This is still a problem and evidently is not a dataview problem but a code problem in the database. "favorites" is in the web_user_car.cart_type_code field in the database. Evidently this is what is being put in with hard coding by the public website. "FAVORITE" is what is in the code_value.value field for code_value_id 3902 group_name CART_TYPE_CODE. So there needs to be some harminization done. If codes are supposed to be in all caps, to be consistent all the records that have "favorites" should at least be changed to "FAVORITES" or "FAVORITE" and whatever is in the code for the public website needs to be changed to put in "FAVORITES" or "FAVORITE". If also we shy away from plurals in codes, then "FAVORITE" should be the choice above and nothing needs to be done to the value in the code_value table. Otherwise if nothing is changed in the public interface or the data already in GRIN, then the value in code_value.value table needs to be changed to favorites.
The database administrator and the public interface developers need to decide how to proceed on this and do it. This is a bug not an enhancement.
Kurt please give ownership of this ticket to whoever you think most appropriate. Lets not miss this fix for the next build.
comment:2 by , 4 years ago
DBA Note:
1) The value field should be in all caps unless
1.1) It is non-alphabetic
2.2) The capitalization has a domain-specific/scientific meaning.
2.3) EXAMPLE: See PATHOLOGY_STATUS code group.
2) Pluralization should be consistent within a given group. In the case of CART_TYPE_CODE, changing "FAVORITE" to "FAVORITES" will resolve the PW issue, unless there is code that for some reason is case-sensitive.
2.1) EX: A query containing "WHERE cart_type_code = 'FAVORITES'" will return results, although all values in web_user_cart.cart_type_code are currently in lowercase.
comment:3 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:5 by , 4 years ago
Change to code_value.value to "FAVORITES" now allows for search tool dropdown for cart_type_code to work on npgsDEV. I will clear ticket when implemented on npgsWEB.
comment:6 by , 4 years ago
| Milestone: | Next Release - Server → Next Release - CT |
|---|
comment:7 by , 4 years ago
| Milestone: | Next Release - CT → Next Release - Server |
|---|
comment:9 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

What the search tool shows when trying to find favorite cart type