-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use taxon children when searching classification #3168
Use taxon children when searching classification #3168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @fkoessler, thanks a lot for submitting this PR! Could you please add some specs to cover this change? 🙏
Hello @aitbw , thanks for reviewing. I added some specs that cover the change. Let me know if I can improve the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor typos to correct and we should be done
Thanks @fkoessler! 👌 could you please squash your commits into one? That should be enough to finish this PR 😸 |
Promotion rule is now actionnable if product has a child taxon of taxon rule
7fe909d
to
cfb43ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great! Do you think this can impact performances negatively since we now could potentially have way more database queries?
There will be a performance overhead since
In any case, the taxon promotion rule won't work as expected until Let me know what you think about this. |
I'm fine with a performance regression if we are making things work as expected. The overhead will probably be higher depending on how many nested taxons you have and if the promotion is auto-applied (without the promo code), but in that case, I'd left to each store to fix eventual performance issues on their own. Thanks for the accurate explanation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am okay with this! Thanks @fkoessler!
Description
In current implementation,
eligible?
checks the configured taxons and all descendants andactionable?
only seems to check against the taxons themselves. This leads to buggy behavior. See: #1409 (comment)This commit modifies
actionable?
and have it check against configured taxons and all descendants in order to have a coherent behavior.