Skip to content

Manuscript-channel validation before adding a channel member

Vaibhav Rathore requested to merge feature/1191/nbdt-bug into main

Targets #1191

Crash debug log from NBDT instance image

Summary

Based on the issue, the channel is linked to the manuscript, specifically the first version of the manuscript (when the manuscript is created, the channels are also created). When we assign a reviewer/editor/team-member to another version, the assignment for the team member happens to the version-specific manuscript id. The code was using the manuscript version id to create a channel member, which is incorrect because there are no channels linked with the version id.

Changes include:

  1. Checking if the manuscript has parent id or not. If yes, then fetch the channel based on parent manuscript id
  2. I realized there were duplicate entries going in to channel member, hence added a check to not create new channel member if the user is already a part of that channel (either via new assignment, mention, or self-participation in chat messages)

Merge request reports