-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 }} |
There was a problem hiding this comment.
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
interview/models.py
Outdated
@@ -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} |
There was a problem hiding this comment.
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
interview/models.py
Outdated
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/" |
There was a problem hiding this comment.
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.
interview/models.py
Outdated
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( |
There was a problem hiding this comment.
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}"
interview/models.py
Outdated
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") |
There was a problem hiding this comment.
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.
6ce4bd9
to
7994458
Compare
interview/models.py
Outdated
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 |
There was a problem hiding this comment.
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 ?
Planned interview email provides a video conference meeting url suggestion
Move the interview url definition inside the interviewKind model element
c4b4923
to
97b850f
Compare
Suggest an url meeting in the email of the planned meeting