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

Make all users contacts by default #2710

Merged
merged 7 commits into from
Jan 23, 2025
Merged

Make all users contacts by default #2710

merged 7 commits into from
Jan 23, 2025

Conversation

BCerki
Copy link
Contributor

@BCerki BCerki commented Jan 18, 2025

card: #2338

This PR:

@BCerki BCerki force-pushed the 2338-default-contacts branch from a23f18b to d5b307e Compare January 20, 2025 18:05
user_operator.verified_by_id = admin_user_guid

if user_operator.status == UserOperator.Statuses.DECLINED:
# Set role to pending for now but we may want to add a new role for declined
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 brought this over from the v1 version of the service

@BCerki BCerki force-pushed the 2338-default-contacts branch from 9403b34 to 1b6360d Compare January 20, 2025 18:29
subsequent_user_operator.user.get_full_name(),
subsequent_user_operator.user.email,
)
# # Assert that the email notification was called
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andrea-williams , the email tests fail now that I've created a v2 version of the service. Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm I'm not sure. Will investigate this more tmr.

Copy link
Contributor

Choose a reason for hiding this comment

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

tbh I'm feeling suspicious of this. I played around with a code a bit locally and was getting the same failure where it's not being called, but I can't think why. @Sepehr-Sobhani do you have time to take a quick look and see if you can spot what's going on?

Copy link
Contributor

Choose a reason for hiding this comment

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

if it's not a quick debug/fix, I'm happy to leave it for now and call it a later problem, since we're not ready to implement the email notifications for Reg2 yet anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of service.user_operator_service.send_operator_access_request_email use service.user_operator_service_v2.send_operator_access_request_email and it will work.

@BCerki BCerki force-pushed the 2338-default-contacts branch from c1031ed to 3efa6db Compare January 20, 2025 20:08
@BCerki BCerki marked this pull request as ready for review January 20, 2025 20:08
bc_obps/service/user_operator_service_v2.py Outdated Show resolved Hide resolved
subsequent_user_operator.user.get_full_name(),
subsequent_user_operator.user.email,
)
# # Assert that the email notification was called
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm I'm not sure. Will investigate this more tmr.

Comment on lines 144 to 145
user_operator.verified_at = datetime.now(ZoneInfo("UTC"))
user_operator.verified_by_id = admin_user_guid
Copy link
Contributor

Choose a reason for hiding this comment

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

could use set_verification_columns() here instead

@BCerki BCerki force-pushed the 2338-default-contacts branch from fe65b29 to 63a770f Compare January 22, 2025 15:49
Copy link
Contributor

@andrea-williams andrea-williams left a comment

Choose a reason for hiding this comment

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

Ran locally. Logged in as bc-cas-dev and confirmed that after approving bc-cas-dev-secondary as a user, they automatically appeared in the Contact table when they weren't there before.

Would recommend adding testing notes in either the PR or the card that basically explain that ^. Feedback received from POs is that they sometimes have to spend a long time figuring out how to test a PR before they can approve it, so testing notes like this could probably help.

@BCerki BCerki force-pushed the 2338-default-contacts branch from 63a770f to e036fff Compare January 23, 2025 16:01
@BCerki BCerki merged commit c3d4df0 into develop Jan 23, 2025
42 checks passed
@BCerki BCerki deleted the 2338-default-contacts branch January 23, 2025 16:29
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.

3 participants