Skip to content
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

Search built in to the "user" type field is broken #28

Open
ChemiKyle opened this issue Aug 4, 2020 · 0 comments
Open

Search built in to the "user" type field is broken #28

ChemiKyle opened this issue Aug 4, 2020 · 0 comments

Comments

@ChemiKyle
Copy link
Contributor

ChemiKyle commented Aug 4, 2020

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_advanced module
  • 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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant