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

feat(certification): Optionally email certifier #628

Merged
merged 4 commits into from
May 11, 2020

Conversation

dleard
Copy link
Contributor

@dleard dleard commented May 8, 2020

  • Add checkbox to optionally notify certifier by email
  • Updates certification_url table with boolean to indicate whether to send an email
  • Updates trigger function to not send email on boolean = false
  • Create pgTap tests to test trigger function
  • Update jest/cypress tests

@dleard dleard requested a review from matthieu-foucault May 8, 2020 22:25
@dleard dleard force-pushed the feature/optional-certifier-email branch from 72f9aad to e9e04c7 Compare May 11, 2020 16:31
wenzowski
wenzowski previously approved these changes May 11, 2020
Copy link
Contributor

@wenzowski wenzowski left a comment

Choose a reason for hiding this comment

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

comments for consideration, but this looks good to merge :)

@@ -18,7 +18,8 @@ create table ggircs_portal.certification_url (
updated_by int references ggircs_portal.ciip_user,
deleted_at timestamp with time zone,
deleted_by int references ggircs_portal.ciip_user,
certification_request_sent_to varchar(1000),
send_certification_request boolean not null default false,
Copy link
Contributor

Choose a reason for hiding this comment

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

UX, maybe already addressed: if this is false by default how do we ensure users know that this critical email won't be sent unless the toggle is clicked?

Out of scope on this PR but worth closing the loop with @rajpersram maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe the default should be true and the toggle should begin as clicked? I'll make a task in youtrack to visit the idea with @rajpersram

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-- timestamp when the email was sent
new.certification_request_sent_at = now();
return new;
if (new.send_certification_request = true) then
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd love to see ggircs_portal_private.run_graphile_worker_job split so instead of switching when tg_argv[0] = 'certification_request' each of those blocks is contained within a function. This function is really scheduling jobs rather than running them, right? Tech debt for later I think (should add to tracker)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make an unscheduled tech debt task for this in youtrack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dleard dleard force-pushed the feature/optional-certifier-email branch from e9e04c7 to 1d8a0f3 Compare May 11, 2020 22:45
Copy link
Contributor

@wenzowski wenzowski left a comment

Choose a reason for hiding this comment

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

:shipit:

@dleard dleard merged commit c33e80d into develop May 11, 2020
@dleard dleard deleted the feature/optional-certifier-email branch May 11, 2020 23:05
@bc-cas-shipit bc-cas-shipit bot temporarily deployed to wksv3k-dev May 12, 2020 00:15 Inactive
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.

2 participants