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

Resending email invitations implementation #516

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zeynepaki
Copy link
Collaborator

@coveralls
Copy link

coveralls commented May 24, 2022

Coverage Status

Coverage increased (+0.01%) to 82.51% when pulling 7bb4ecd on resending-email-invitations into 3040d67 on master.

@zeynepaki zeynepaki marked this pull request as ready for review May 25, 2022 12:50
@zeynepaki zeynepaki requested a review from GraemeWatt May 26, 2022 09:35
Copy link
Member

@GraemeWatt GraemeWatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great! I've tested and it works well, but I think some small changes are needed in the new send_reminder_email function (commented separately). Also, it wasn't mentioned in the original issue #191, but I made some comments elsewhere (linked from #191) that I'd like an option for the Coordinator to add a personalised message to the reminder. Sorry that I didn't make that clear. Could you please add a text box (similar to the one available from the "Notify Participants" button) where the Coordinator could add an optional message to be passed to submission_status.html?

)
coordinator = User.query.get(hepsubmission.coordinator)

reviewers_notified = submission_participant.user_account is not None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this. I would just set reviewers_notified = True to get the correct text in submission_status.html.

actor=coordinator.email,
article=record_information['recid'],
message=None,
invite_token=submission_participant.invitation_cookie,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The invite_token should be set as in send_notification_email, i.e.

invite_token = None
if not submission_participant.user_account:
    invite_token = submission_participant.invitation_cookie

This ensures that the link to assign permissions is not displayed in submission_status.html if the permissions have already been claimed.

if not reviewers_notified:
message_subject = '[HEPData] Reminder to review submission {0}'.format(record_information['recid'])
else:
message_subject = '[HEPData] Reminder about submission {0}'.format(record_information['recid'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using reviewers_notified in these conditions I would check for if submission_participant.role == 'reviewer' to use the first subject, else use the second subject.

@zeynepaki zeynepaki marked this pull request as draft May 30, 2022 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dashboard: add option to manager widget to resend email invitations to Uploaders/Reviewers
4 participants