Sending email to all reviewers

Hi @asmecher,

I am sorry I am not good enough with the GitHub :frowning: But I simplified my changes so it is very easy to understand.

I have “undo” all the changes and changed only the file “IssueManagementHandler.inc.php”. What I would like to try is to get a list of reviewers instead of a list of readers.

My understanding is that the template “notifyUsers.tpl” calls “IssueManagementHandler.inc.php”, precisely that the code

 <tr valign="top">
     <td><input type="radio" id="allReaders" name="whichUsers" value="allReaders"/></td>
     <td class="label">
         <label for="allReaders">{translate key="editor.notifyUsers.allReaders" count=$allReadersCount|default:0}</label>
     </td>
 </tr>

calls the code

case 'allReaders':
                    $recipients =& $roleDao->getUsersByRoleId(
                        ROLE_ID_REVIEWER, /*ROLE_ID_READER,*/
                        $journal->getId()
                    );

So I changed the ROLE_ID_READER to ROLE_ID_REVIEWER as you can see above.

The problem is that the SQL debug shows the SQL statement

(mysql): SELECT COUNT(DISTINCT(user_id)) FROM roles WHERE journal_id = 1 AND role_id = 1048576

that is the define for the ROLE_ID_READER instead of

(mysql): SELECT COUNT(DISTINCT(user_id)) FROM roles WHERE journal_id = 1 AND role_id = 4096

which is the define for the ROLE_ID_REVIEWER

So I guess I have not figured out correct way to do this. I think I am looking into wrong files


Best regards, PrimoĆŸ