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

Osdev 1376 closure report. updating auto email response to remove the word 'rejected' #460

Conversation

FrancescaOSH
Copy link
Collaborator

Updated the automated email for closure reports (report_result( to remove the term "Rejected" for an improved user experience. Added link to Closure Report policy and instructions to submit a reopening report to provide users with more information on the process.

Updated text to remove the word "Rejected", added link to facility claim policy and clearer instruction to send a Reopen report.
Removed "Rejected", added link to policy, added instructions to submit reopening report.
Added closure report automated email update OSDEV-1376.
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:19 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:19 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:19 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:19 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:20 — with GitHub Actions Inactive
Copy link

coderabbitai bot commented Dec 16, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces improvements to the Open Supply Hub project, focusing on enhancing user experience and fixing backend issues. The changes include correcting date validation on the Moderation Queue page, fixing country sorting in the API endpoint, and updating email templates for closure reports. The release notes and email templates have been modified to provide clearer communication, remove the term "Rejected", and add links to the Closure Policy. Additionally, release instructions were updated to ensure proper database migration and indexing during deployment.

Changes

File Change Summary
doc/release/RELEASE-NOTES.md Updated release notes for version 1.27.0, documenting bug fixes and improvements, including date validation and sorting corrections, new email features, and updated deployment instructions.
src/django/api/templates/mail/report_result_body.html Refined email template with improved language, removed "Rejected" terminology, added Closure Policy link, and clarified reporting instructions.
src/django/api/templates/mail/report_result_body.txt Updated plain text email template with similar changes to HTML version, including language refinement and addition of Closure Policy link.

Possibly Related PRs

Suggested Reviewers

  • vladsha-dev
  • Innavin369
  • mazursasha1990

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9aab1ac and 1dbecc8.

📒 Files selected for processing (1)
  • doc/release/RELEASE-NOTES.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • doc/release/RELEASE-NOTES.md

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
src/django/api/templates/mail/report_result_body.txt (2)

6-6: Consider adding commas in compound sentences

The message content is clear but could benefit from better punctuation in compound sentences.

Apply these changes for better readability:

-{% if is_closure and is_rejected %}We did not approve this report and the facility's profile in OS Hub has not been changed. For more details, view our Facility Closure Policy: https://info.opensupplyhub.org/governance-policies.{% endif %}{% if is_closure and is_confirmed %}The facility profile on OS Hub has now been updated and the facility is marked as closed.{% endif %}{% if is_reopening and is_rejected %}We did not approve this report and the facility's profile on OS Hub has not been changed.{% endif %}{% if is_reopening and is_confirmed %}The facility profile on OS Hub has now been updated and the facility is no longer marked as closed.{% endif %}
+{% if is_closure and is_rejected %}We did not approve this report, and the facility's profile in OS Hub has not been changed. For more details, view our Facility Closure Policy: https://info.opensupplyhub.org/governance-policies.{% endif %}{% if is_closure and is_confirmed %}The facility profile on OS Hub has now been updated, and the facility is marked as closed.{% endif %}{% if is_reopening and is_rejected %}We did not approve this report, and the facility's profile on OS Hub has not been changed.{% endif %}{% if is_reopening and is_confirmed %}The facility profile on OS Hub has now been updated, and the facility is no longer marked as closed.{% endif %}
🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...y profile on OS Hub has now been updated and the facility is marked as closed.{% end...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~6-~6: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...y profile on OS Hub has now been updated and the facility is no longer marked as clo...

(COMMA_COMPOUND_SENTENCE_2)


10-10: Fix grammar and formatting issues

There are several grammar and formatting issues in the instructions section.

Apply these changes:

-{% if is_rejected %}If you have additional evidence that can be used to verify that the facility is {{ closure_state|lower }}, email the relevant documents to: [email protected]{% endif %}{% if is_closure and is_confirmed %}Should you receive reports that the facility is re-opened in the future, please send us an report clicking the "Report" button (flag icon) on the facility profile and choosing "Report as Reopened".{% endif %}
+{% if is_rejected %}If you have additional evidence that can be used to verify that the facility is {{ closure_state|lower }}, email the relevant documents to [email protected]{% endif %}{% if is_closure and is_confirmed %}Should you receive reports that the facility is re-opened in the future, please send us a report by clicking the "Report" button (flag icon) on the facility profile and choosing "Report as Reopened".{% endif %}

Changes:

  1. Removed unnecessary colon before email address
  2. Fixed article usage: "an report" → "a report"
  3. Added "by" before "clicking" for better flow
🧰 Tools
🪛 LanguageTool

[typographical] ~10-~10: Do not use a colon (:) before a series that is introduced by a preposition (‘to’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...|lower }}, email the relevant documents to: [email protected]{% endif %}{% if ...

(RP_COLON)


[misspelling] ~10-~10: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...re-opened in the future, please send us an report clicking the “Report” button (fl...

(EN_A_VS_AN)

src/django/api/templates/mail/report_result_body.html (2)

13-17: Ensure consistent spacing in HTML template

The HTML template has inconsistent spacing between paragraphs and conditions.

Add consistent line breaks between paragraphs and conditions for better maintainability:

            Thank you for reporting the facility {{ facility_name }} as {{ closure_state|lower }}.
-            {% if is_closure and is_rejected %}We did not approve this report and the facility's profile on OS Hub has not been changed. For more details, view our <a href="https://info.opensupplyhub.org/governance-policies">Facility Closure Policy</a>.{% endif %}
-            {% if is_closure and is_confirmed %}The facility profile on OS Hub has now been updated and the facility is marked as closed.{% endif %}
-            {% if is_reopening and is_rejected %}We did not approve this report and the facility's profile on OS Hub has not been changed.{% endif %}
-            {% if is_reopening and is_confirmed %}The facility profile on OS Hub has now been updated and the facility is no longer marked as closed.{% endif %}
+
+            {% if is_closure and is_rejected %}
+                We did not approve this report, and the facility's profile on OS Hub has not been changed. For more details, view our <a href="https://info.opensupplyhub.org/governance-policies">Facility Closure Policy</a>.
+            {% endif %}
+
+            {% if is_closure and is_confirmed %}
+                The facility profile on OS Hub has now been updated, and the facility is marked as closed.
+            {% endif %}
+
+            {% if is_reopening and is_rejected %}
+                We did not approve this report, and the facility's profile on OS Hub has not been changed.
+            {% endif %}
+
+            {% if is_reopening and is_confirmed %}
+                The facility profile on OS Hub has now been updated, and the facility is no longer marked as closed.
+            {% endif %}

26-26: Fix grammar issues in instruction paragraphs

The instruction paragraphs have the same grammar issues as the text template.

Apply these changes:

-            If you have additional evidence that can be used to verify that the facility is {{ closure_state|lower }}, email the relevant documents to: [email protected]
+            If you have additional evidence that can be used to verify that the facility is {{ closure_state|lower }}, email the relevant documents to [email protected]

-            Should you receive reports that the facility is re-opened in the future, please send us an report clicking the "Report" button (flag icon) on the facility profile and choosing "Report as Reopened"
+            Should you receive reports that the facility is re-opened in the future, please send us a report by clicking the "Report" button (flag icon) on the facility profile and choosing "Report as Reopened"

Also applies to: 31-31

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81a9845 and bc40639.

📒 Files selected for processing (3)
  • doc/release/RELEASE-NOTES.md (1 hunks)
  • src/django/api/templates/mail/report_result_body.html (2 hunks)
  • src/django/api/templates/mail/report_result_body.txt (1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/django/api/templates/mail/report_result_body.txt

[uncategorized] ~6-~6: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...y profile on OS Hub has now been updated and the facility is marked as closed.{% end...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~6-~6: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...y profile on OS Hub has now been updated and the facility is no longer marked as clo...

(COMMA_COMPOUND_SENTENCE_2)


[typographical] ~10-~10: Do not use a colon (:) before a series that is introduced by a preposition (‘to’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...|lower }}, email the relevant documents to: [email protected]{% endif %}{% if ...

(RP_COLON)


[misspelling] ~10-~10: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...re-opened in the future, please send us an report clicking the “Report” button (fl...

(EN_A_VS_AN)

🔇 Additional comments (3)
src/django/api/templates/mail/report_result_body.txt (2)

2-4: LGTM: Professional greeting and acknowledgment

The updated greeting "Hello" and acknowledgment message are more professional and clearly state the context of the report.


12-12: LGTM: Professional closing

The closing "Best Regards" is professional and appropriate.

doc/release/RELEASE-NOTES.md (1)

26-26: LGTM: Clear and comprehensive release note

The release note clearly documents the changes made to the automated emails, including the removal of "Rejected" term and addition of policy links and reopening instructions.

@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:22 — with GitHub Actions Inactive
Copy link

barecheck bot commented Dec 16, 2024

React App | Jest test suite - Code coverage report

Total: 27.88%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:26 — with GitHub Actions Inactive
Copy link

barecheck bot commented Dec 16, 2024

Dedupe Hub App | Unittest test suite - Code coverage report

Total: 56.14%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:27 — with GitHub Actions Inactive
Copy link

barecheck bot commented Dec 16, 2024

Countries App | Unittest test suite - Code coverage report

Total: 100%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:27 — with GitHub Actions Inactive
Copy link

barecheck bot commented Dec 16, 2024

Contricleaner App | Unittest test suite - Code coverage report

Total: 98.91%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@FrancescaOSH FrancescaOSH temporarily deployed to Quality Environment December 16, 2024 11:36 — with GitHub Actions Inactive
Copy link

barecheck bot commented Dec 16, 2024

Django App | Unittest test suite - Code coverage report

Total: 79.96%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

mazursasha1990
mazursasha1990 previously approved these changes Dec 17, 2024
Copy link
Contributor

@mazursasha1990 mazursasha1990 left a comment

Choose a reason for hiding this comment

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

LGTM

remove spacing
Copy link
Contributor

@roman-stolar roman-stolar left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mazursasha1990 mazursasha1990 left a comment

Choose a reason for hiding this comment

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

LGTM

@roman-stolar roman-stolar enabled auto-merge (squash) December 17, 2024 12:02
@roman-stolar roman-stolar deleted the OSDEV-1376-Closure-Report.-Updating-auto-email-response-to-remove-the-word-'rejected' branch December 17, 2024 14:23
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:27 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:31 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:32 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:32 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment December 17, 2024 14:42 — with GitHub Actions 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.

3 participants