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

Process planned enhance email meeting url #305

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

abessette
Copy link
Collaborator

Suggest an url meeting in the email of the planned meeting

@abessette abessette requested a review from bport March 9, 2023 15:51
Copy link
Collaborator

@bport bport left a comment

Choose a reason for hiding this comment

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

Also need to add a changelog entry

@@ -7,3 +7,5 @@ Interview goal: {{ interview.get_goal }}
{% endautoescape %}

{{ url }}

Video conference app suggestion: {{ interview_video_url }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The sentence need to be translatable

@@ -635,17 +635,27 @@ def trigger_notification(self):

subject = None
body_template = None
url = os.path.join(settings.SITE_HOST, self.process.get_absolute_url().lstrip("/"))
body_params = {"interview": self, "url": url}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't need to move those lines. We need only them if we have a subject and a body template

if self.state == Interview.WAITING_PLANIFICATION:
subject = _("New interview for {process}").format(process=self.process)
body_template = "interview/email/new_interview.txt"

elif self.state == Interview.PLANNED:
subject = _("Interview planned: {process}").format(process=self.process)
body_template = "interview/email/interview_planned.txt"
try:
video_meeting_url = "https://talk.enioka.com/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't expect people to have access to talk.enioka.com the base string can be part of InterviewKind. That means we need to extend InterviewKind model.

if self.state == Interview.WAITING_PLANIFICATION:
subject = _("New interview for {process}").format(process=self.process)
body_template = "interview/email/new_interview.txt"

elif self.state == Interview.PLANNED:
subject = _("Interview planned: {process}").format(process=self.process)
body_template = "interview/email/interview_planned.txt"
try:
video_meeting_url = "https://talk.enioka.com/"
video_meeting_url += "_".join(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can simplify that by not using trigram and just format with name slug
i.e. we can configure it like "https://hosts.com/entretien/{name_slug}"

video_meeting_url += "/interview_" + self.process.candidate.name_slug
body_params["interview_video_url"] = video_meeting_url
except RecursionError as err:
print("No interviewers/consultantManager supplied")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we will still need the try / except. However, if needed, use logger instead of print.

@abessette abessette force-pushed the process_planned_enhance_email_meeting_url branch 3 times, most recently from 6ce4bd9 to 7994458 Compare March 22, 2023 11:37
if self.state == Interview.WAITING_PLANIFICATION:
subject = _("New interview for {process}").format(process=self.process)
body_template = "interview/email/new_interview.txt"

elif self.state == Interview.PLANNED:
subject = _("Interview planned: {process}").format(process=self.process)
body_template = "interview/email/interview_planned.txt"
try:
if self.kind_of_interview is not None and self.kind_of_interview.medium is not None:
interview_medium = self.kind_of_interview.medium + "/interview/" + self.process.candidate.name_slug
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think interview need to be part of medium and medium need to be formatted with the name_slug and if possible allowing to define medium with different kind of data from interview

In which case RecursionError will happen ?

@abessette abessette force-pushed the process_planned_enhance_email_meeting_url branch from c4b4923 to 97b850f Compare May 11, 2023 07:32
@abessette abessette requested a review from bport August 17, 2023 16:41
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