Event log entry for act of unassigning an editor from an article during review (OJS 2.4.x)

OJS 2.4.x records an event record for act of assigning an editor to an article. The event ID is ARTICLE_LOG_EDITOR_ASSIGN and this event is posted to the log by the method EditorAction::assignEditor, which is called from the EditorHandler class. One of our editors noted that the act of unassigning and editor (deleting the EditAssignment) does not generate a similar message in the history of an article. He has need of this feature and adding it addresses the symmetry of the situation.

Looking at the source code, there is an event code already existing for this action: ARTICLE_LOG_EDITOR_UNASSIGN. However there is no PHP code that makes reference to this event in either the EditorHandler or the EditorAction class (in 2.4.8). As well, there is a method EditorHandler::deleteEditAssignment, but there is no corresponding EditorAction::deleteEditAssignment method, presumably because deleting an assignment is a trivial task and can be done within the page handler class.

Implementing the unassign event tracking can be done with two small modifications to the code:

  1. Add a log message for this event to the locale.xml file [Add outer <> to make this work]:

message key=“log.editor.editorUnassigned”>{$editorName} has been removed as editor from submission {$articleId}.</message

  1. Add the following two lines to the page handler, just below the $editAssignmentDao->deleteEditAssignmentById call:

import(‘classes.article.log.ArticleLog’);

ArticleLog::logEvent($request, $article, ARTICLE_LOG_EDITOR_UNASSIGN, ‘log.editor.editorUnassigned’, array(‘editorName’ => $editAssignment->getEditorFullName(), ‘editorId’ => $editAssignment->getEditorId()));

I note that adding an event logging action to the page handling hierarchy is unusual. Is it wrong to do this?
Roger