Skip to content

[DQT] Fix Data Query Tool execution for BMI and MRI (#10129, #9772)#10298

Merged
driusan merged 1 commit intoaces:mainfrom
arnav-makkar:fix/query-not-yet-run
Feb 23, 2026
Merged

[DQT] Fix Data Query Tool execution for BMI and MRI (#10129, #9772)#10298
driusan merged 1 commit intoaces:mainfrom
arnav-makkar:fix/query-not-yet-run

Conversation

@arnav-makkar
Copy link
Copy Markdown
Contributor

Brief summary of changes

This PR fixes a critical bug in InstrumentQueryEngine that prevented queries from running successfully for certain instruments, specifically resolving issues with BMI (#10129) and MRI (#9772).

The root cause was a misplaced yield statement within the _dataToIterator method in modules/instruments/php/instrumentqueryengine.class.inc.

The Bug:
The yield statement was inside the inner foreach loop that iterates through selected fields. This caused the generator to yield a result for every single field being processed for a candidate.

The Fix:
I moved the yield statement outside the inner loop. Now, the code correctly iterates through all requested fields to build the complete data array for a candidate before yielding it.

BMI Screenshot:
Screenshot 2026-01-22 at 23 47 00

MRI Screenshot:
Screenshot 2026-01-22 at 23 48 09

It's always satisfying when a single line change, literally moving one line down using whitespace simultaneously solves two separate issues!

Link(s) to related issue(s)

@github-actions github-actions Bot added Language: PHP PR or issue that update PHP code Module: instruments PR or issue related to instruments module labels Jan 22, 2026
Copy link
Copy Markdown
Contributor

@kongtiaowang kongtiaowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arnav-makkar
Copy link
Copy Markdown
Contributor Author

Also resolves #9829

@kongtiaowang kongtiaowang added the Passed manual tests PR has been successfully tested by at least one peer label Feb 17, 2026
@driusan driusan merged commit 9fdb944 into aces:main Feb 23, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: PHP PR or issue that update PHP code Module: instruments PR or issue related to instruments module Passed manual tests PR has been successfully tested by at least one peer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dataquery] BMI queries not working

3 participants