Repository navigation
[Candidate Identifier (Rework Part 7)] Add Candidate Identifiers Query Engine to Data Query Tool - #11298
[Candidate Identifier (Rework Part 7)] Add Candidate Identifiers Query Engine to Data Query Tool#11298HachemJ wants to merge 6 commits into
Conversation
c36beac to
458df71
Compare
ef3dea1 to
f46fe32
Compare
8662abf to
cfeb84a
Compare
There was a problem hiding this comment.
thanks for getting candidate fields with several values working in dataquery! A few comments inline, mostly small.
For the testing steps, the candidate_identifiers module is installed as inactive, so the new category only shows up in dataquery once it's turned on.
@ridz1208 with this in, PSCID shows up twice in dataquery, once under "Legacy Candidate Identifiers" and once under the new category. Should the legacy fields stay for now since saved queries use them, or go once the identifiers are migrated?
| default: | ||
| throw new Error('Too many visit values'); | ||
| } | ||
| } else if (dictionary?.scope === 'candidate' && |
There was a problem hiding this comment.
this same block is here, at line 769 and at line 930, joined with ; in two of them and ; in the third. Could it be one helper that takes the cell and the dictionary item?
| if (dictionary.type === 'URI') { | ||
| return values[key]; | ||
| } | ||
| return key + '=' + values[key]; |
There was a problem hiding this comment.
for identifiers the key is the CandidateIdentifierID, so a candidate with two values shows something like 4512=ABC;4513=DEF, and the numbers don't mean anything to the user. Could identifiers show just the values, like the URI case does?
| $ids = new \LORIS\Data\Dictionary\Category( | ||
| "Identifiers", | ||
| dgettext("candidate_parameters", "Candidate Identifiers") | ||
| "Legacy Candidate Identifiers" |
There was a problem hiding this comment.
the label lost its dgettext() here, so it won't be translated anymore. Same for the new "Candidate Identifiers" category in queryengine.class.inc:47
|
|
||
| $name = $item->getName(); | ||
|
|
||
| if (!preg_match('/^Identifier_([1-9][0-9]*)$/', $name, $matches)) { |
There was a problem hiding this comment.
small one, this parses the name again right after getFieldNameFromDict() did, could a private helper give both of them the alias?
0a969fb to
1d8ea6c
Compare
|
Thanks once again Henri! I have addressed your comments and updated the testing instructions. |
1d8ea6c to
296512f
Compare
Brief summary of changes
This PR adds support for configurable candidate identifiers in the Data Query Tool (DQT), allowing users to filter candidates using their identifiers and include identifier values in query results.
Previously, the DQT relied on the legacy candidate identifier fields. With the new Candidate Identifiers Query Engine, identifier types configured through the Candidate Identifiers module are dynamically available for querying.
This PR depends on #11288.
Changes
Testing Instructions
Activate the
candidate_identifiersmodule, as it is installed inactive by default. The new category will only appear in the DQT once the module is activated.Open the Data Query Tool (Beta) and continue to Define Fields.
Verify that the "Candidate Identifiers" category appears and contains configured identifier types such as PSCID and ExternalID.
Select an identifier field, filter by a known value, and verify that the correct candidates are returned.
Add PSCID and ExternalID as output fields and verify that their values are displayed correctly.
Test an identifier type that allows multiple values and verify that all associated values are returned and displayed.
Log in with a user who lacks permission for a restricted identifier type and verify that the field is not available.
Verify that identifier types without additional permission restrictions remain available.
Restrict an identifier type to a specific project and verify that its values are only returned for candidates registered in that project.
Run the Candidate Identifiers Query Engine PHPUnit tests and verify that all tests pass: