OBGM-416 Unable to use product filter on add items to PO shipment#4095
Merged
awalkowiak merged 3 commits intofeature/upgrade-to-grails-3.3.10from Jun 7, 2023
Merged
OBGM-416 Unable to use product filter on add items to PO shipment#4095awalkowiak merged 3 commits intofeature/upgrade-to-grails-3.3.10from
awalkowiak merged 3 commits intofeature/upgrade-to-grails-3.3.10from
Conversation
kchelstowski
reviewed
Jun 7, 2023
| def getProductsInOrders(String[] terms, Location destination, Location vendor) { | ||
| return OrderItem.createCriteria().list { | ||
| createAlias('product', 'prod', JoinType.LEFT_OUTER_JOIN) | ||
| createAlias('product.synonyms', 'syn', JoinType.LEFT_OUTER_JOIN) |
Collaborator
There was a problem hiding this comment.
out of curosity it'd be worth also to check if here prod.synonyms would work
| ilike("prod.name", "%" + term) | ||
| and { | ||
| ilike("syn.name", "%" + term) | ||
| eq("syn.synonymTypeCode", SynonymTypeCode.DISPLAY_NAME) |
Collaborator
There was a problem hiding this comment.
could you fix the indent here, so it's not acting like it's nested inside ilike?
Collaborator
Author
There was a problem hiding this comment.
It's acting as it should, not like nested inside ilike
Collaborator
There was a problem hiding this comment.
I know it's acting like it should. maybe "pretending" work would be more appropiate - someone might be confused when reading the code with such an indent 😄 - that's what I meant
kchelstowski
approved these changes
Jun 7, 2023
awalkowiak
requested changes
Jun 7, 2023
|
|
||
| def getProductsInOrders(String[] terms, Location destination, Location vendor) { | ||
| return OrderItem.createCriteria().list { | ||
| createAlias('product', 'prod', JoinType.LEFT_OUTER_JOIN) |
Collaborator
There was a problem hiding this comment.
Make these aliases a product and synonym instead of prod and syn
awalkowiak
approved these changes
Jun 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.