Search by role in ojs 3.5.0.3

Hi

Is any way to search user by role in ojs 3.5.0.3 in a journal??

Thnks

Hi @Enrique_Manuel_Touce,

Settings - Users and Roles - and in the search bar for the current users, you can search by role there - (e.g. author, journal manager, etc.)

-Roger
PKP Team

hi but this not work, return users with other roles

Hi @Enrique_Manuel_Touce,

So you want to be able to limit to just one role (e.g. Editor, Section Editor, etc.)?

-Roger
PKP Team

Yes, I want to filter by one role for example Editor

Hi @Enrique_Manuel_Touce,

Yes - this was in place in previous versions of OJS, but has changed to include an all-encompassing search that allows for certain roles, as we well as additional text to be searched: [Users & Roles] | Update Search user field to include searching for users by role · Issue #11474 · pkp/pkp-lib · GitHub

I tested it and I was able to search for roles. If a user has more than one role associated with an account (e.g. Journal Manager, author) it will return those results as well though.

-Roger
PKP Team

thnks for your reply i add one more line for filter users in the journal who want to search

->when($this->contextIds !== null, fn ($query) => $query->whereIn(DB::raw(‘COALESCE(ug.context_id, 0)’), array_map(intval(…), $this->contextIds)))