Closed
Conversation
- The issue in a nutshell: `CRMS::GetNextItemForReview` is placing project-specific result ORDER BY
first, overriding the two most critical presentation orders (priority and number of reviews already done)
leaving some existing single-review items in limbo.
- `GetNextItemForReview` is another monolithic "wall of code"
- Split the SQL bits of `GetNextItemForReview` into `select_from_queue_for_user` and leave the iteration logic in the original method.
- Add VERY basic test for each method.
- The `select_from_queue_for_user` method is now a good entrypoint for debugging so remove some built-in debugging code (the `$test` param)
into a new utility `bin/debug_user.pl`
- Solve the original problem by splitting the `@orders` array into `@critical_order` and `@noncritical_order`.
Project orders get sandwiched in the middle. I guess they could go anywhere as long as they aren't unshifted onto the critical array.
- Testing the added code is a bit of a dilemma. We don't have a bunch of representative data and faking up something that actually
exercises code that is intended for largish data sets is a bit of a nightmare.
- I'm inclined to leave this only superficially tested, and take comfort in the fact that the situation is marginally better than before.
17a8d36 to
333e0c0
Compare
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.
CRMS::GetNextItemForReviewis placing project-specific result ORDER BY first, overriding the two most critical presentation orders (priority and number of reviews already done) leaving some existing single-review items in limbo.GetNextItemForReviewis another monolithic "wall of code"GetNextItemForReviewinto a new child methodselect_from_queue_for_userand leave the iteration logic in the original method.select_from_queue_for_usermethod is now a good entrypoint for debugging so remove some built-in debugging code (the$testparam) into a new utilitybin/debug_user.pl@ordersarray into@critical_orderand@noncritical_order. Project orders get sandwiched in the middle. I guess they could go anywhere as long as they aren't unshifted onto the critical array.