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

Journal: enable external reviewers through invite assignment invitations #1944

Merged
merged 16 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions openreview/journal/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def set_groups(self, support_role, editors):
## Update settings
content = {
'title': { 'value': self.journal.full_name },
'subtitle': { 'value': self.journal.short_name },
'website': { 'value': self.journal.website },
'contact': { 'value': self.journal.contact_info },
'submission_id': { 'value': self.journal.get_author_submission_id() },
'under_review_venue_id': { 'value': self.journal.under_review_venue_id },
'decision_pending_venue_id': { 'value': self.journal.decision_pending_venue_id },
Expand Down
196 changes: 193 additions & 3 deletions openreview/journal/invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,196 @@ def set_reviewer_assignment(self, assignment_delay):
}
]
)
self.save_invitation(invitation)
self.save_invitation(invitation)

if not self.journal.has_external_reviewers():
return

## external reviewers
invitation = Invitation(
id=self.journal.get_reviewer_invite_assignment_id(),
invitees=[venue_id, action_editors_id] + additional_committee,
readers=[venue_id, action_editors_id] + additional_committee,
writers=[venue_id],
signatures=[self.journal.get_editors_in_chief_id()],
minReplies=1,
maxReplies=1,
type='Edge',
preprocess=self.get_process_content('process/reviewer_invitation_assignment_pre_process.py'),
process=self.get_process_content('process/reviewer_invitation_assignment_process.py'),
edit={
'id': {
'param': {
'withInvitation': self.journal.get_reviewer_invite_assignment_id(),
'optional': True
}
},
'ddate': {
'param': {
'range': [ 0, 9999999999999 ],
'optional': True,
'deletable': True
}
},
'cdate': {
'param': {
'range': [ 0, 9999999999999 ],
'optional': True,
'deletable': True
}
},
'readers': [venue_id, self.journal.get_action_editors_id(number='${{2/head}/number}'), '${2/tail}'],
'nonreaders': [self.journal.get_authors_id(number='${{2/head}/number}')],
'writers': [venue_id],
'signatures': {
'param': {
'regex': venue_id + '|' + editor_in_chief_id + '|' + self.journal.get_action_editors_id(number='.*', anon=True)
}
},
'head': {
'param': {
'type': 'note',
'withInvitation': author_submission_id
}
},
'tail': {
'param': {
'type': 'profile',
'notInGroup': self.journal.get_reviewers_id()
}
},
'weight': {
'param': {
'minimum': -1
}
},
'label': {
'param': {
'enum': [
'Invitation Sent',
'Accepted',
'Declined.*',
'Pending Sign Up',
'Conflict Detected'
],
'default': 'Invitation Sent'
}
}
}
)

self.save_invitation(invitation)

with open(os.path.join(os.path.dirname(__file__), 'webfield/paperRecruitResponseWebfield.js')) as f:
content = f.read()
web = content

invitation = Invitation(id=self.journal.get_reviewer_assignment_recruitment_id(),
invitees=['everyone'],
readers=['everyone'],
writers=[venue_id],
signatures=[venue_id],
edit={
'signatures': ['(anonymous)'],
'readers': [venue_id],
'writers': [venue_id],
'note': {
'signatures': [
'${3/signatures}'
],
'readers': [
venue_id,
'${2/content/user/value}',
'${2/content/inviter/value}'
],
'writers': [
venue_id
],
'content': {
'title': {
'order': 1,
'description': "Title",
'value': {
'param': {
'type': 'string',
'const': 'Recruit response'
}
}
},
'user': {
'order': 2,
'description': "email address",
'value': {
'param': {
'type': 'string',
'regex': '.*'
}
}
},
'key': {
'order': 3,
'description': 'Email key hash',
'value': {
'param': {
'type': 'string',
'regex': '.{0,100}'
}
}
},
'response': {
'order': 4,
'description': "Invitation response",
'value': {
'param': {
'type': 'string',
'enum': [
'Yes',
'No'
],
'input': 'radio'
}
}
},
'comment': {
'order': 5,
'description': '(Optionally) Leave a comment to the organizers of the venue.',
'value': {
'param': {
'type': 'string',
'maxLength': 5000,
'optional': True,
'input': 'textarea'
}
}
},
'submission_id': {
'order': 6,
'description': 'submission id',
'value': {
'param': {
'type': 'string',
'regex': '.*'
}
}
},
'inviter': {
'order': 7,
'description': 'inviter id',
'value': {
'param': {
'type': 'string',
'regex': '.*'
}
}
}
}
}
},
process=self.get_process_content('process/reviewer_assignment_recruitment_process.py'),
web = web
)

self.save_invitation(invitation)

def set_review_approval_invitation(self):
venue_id = self.journal.venue_id
Expand Down Expand Up @@ -3409,10 +3598,11 @@ def set_reviewer_assignment_invitation(self, note, duedate):
<br>'
}

edit_param = self.journal.get_reviewer_assignment_id()
edit_param = f'{self.journal.get_reviewer_assignment_id()};{self.journal.get_reviewer_invite_assignment_id()}'
score_ids = [self.journal.get_reviewer_affinity_score_id(), self.journal.get_reviewer_conflict_id(), self.journal.get_reviewer_custom_max_papers_id() + ',head:ignore', self.journal.get_reviewer_pending_review_id() + ',head:ignore', self.journal.get_reviewer_availability_id() + ',head:ignore']
browse_param = ';'.join(score_ids)
params = f'start=staticList,type:head,ids:{note.id}&traverse={edit_param}&edit={edit_param}&browse={browse_param}&maxColumns=2&version=2&referrer=[Return Instructions](/invitation?id={invitation.id})'
filter_param = f'{self.journal.get_reviewer_pending_review_id()} == 0 AND {self.journal.get_reviewer_availability_id()} == Available'
params = f'start=staticList,type:head,ids:{note.id}&traverse={edit_param}&edit={edit_param}&browse={browse_param}&filter={filter_param}&maxColumns=2&version=2&referrer=[Return Instructions](/invitation?id={invitation.id})'
with open(os.path.join(os.path.dirname(__file__), 'webfield/assignReviewerWebfield.js')) as f:
content = f.read()
content = content.replace("var CONFERENCE_ID = '';", "var CONFERENCE_ID = '" + venue_id + "';")
Expand Down
Loading