-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Complete user search is broken, and must have been for some time for forms with fields of type user.
To recreate:
- Use REDCap 9.3.5 or greater (possibly earlier)
- Enable the
protocols_advancedmodule - Enable the module on any project
- Navigate to the "Protocols" page
- Attempt to select a PI
- Observe that the list never populates
The root of the issue is here:
redcap_entity/manager/js/entity_fields.js
Lines 57 to 65 in c8cfdff
| ajax: { | |
| url: app_path_webroot + 'UserRights/search_user.php', | |
| dataType: 'json', | |
| cache: true, | |
| delay: 250, | |
| data: function (params) { | |
| params.searchEmail = true; | |
| return params; | |
| }, |
At some point, the UserRights/search_user.php endpoint began requiring a term in the GET data and it cannot be set to empty string.
A good candidate to replace the call to this page may be the Project->getUsers() function, although this requires a Project object be available and is scoped to the project from which it is called.
Better would be to find a way to get an empty string or wildcard in to the term arg:
data: function (params) {
params.searchEmail = true;
params.term = wildcardChar;
return params;
}, Also consider hijacking the user-listcall made by the ExternalModules config menu.
Metadata
Metadata
Assignees
Labels
No labels