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

PIMS-1756: Template formatting and hyperlink fixes #2554

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

GrahamS-Quartech
Copy link
Contributor

🎯 Summary

PIMS-1756:

  • Made some slight optimizations and additions to the way relations are gathered for the project to generate a notification.
  • There is now an additional field for the config object where it will get the title tag and uri for the templates. It uses FRONTEND_URL for the uri.
  • Fixed templates using the wrong property to determine parcel or building for their if statements.
  • Fixed some templates using the wrong property for ProjectNumber
  • Fixed templates using the wrong property to determine NoteType
  • The uri for the href of tags will now be dynamically constructed to link to the relevant project rather than just the homepage when appropriate
  • Removed nullish coalescing operator from property accesses. It seems this is not supported by nunjucks and will fail even when accessing a non-null property.
  • Fixed instances where the templates were expecting evaluations to use a Date object rather than a Year integer
  • Fixed sort order of the statement that determines the assessment value to display so that it gets the most recent year rather than the oldest
  • Corrected "Signin" to "Sign in"

...And probably a couple other things too.
Please give it a decent read over and let me know if I missed something.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

…rsion of templates, including missing project numbers, using wront identifier for determining property type, nullish coalescing operators, and a few others. Uri for the current environment's uri will not be included in relevant <a> tags. Slight change to gathering project and relations for the generating notifications function.
Copy link

🚀 Deployment Information

The Express API Image has been built with the tag: 2554. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Jul 18, 2024

Code Climate has analyzed commit 5534a2a and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 92.5%.

View more on Code Climate.

@dbarkowsky
Copy link
Collaborator

What's the best way to test this? Just send yourself emails, I suppose?

@GrahamS-Quartech
Copy link
Contributor Author

What's the best way to test this? Just send yourself emails, I suppose?

Yeah, I would just choose a project with a few properties that have assessment values on them and try changing them into statuses that will prompt notifications. You can also add a new test project to ensure the new project notification works.

Copy link
Collaborator

@TaylorFries TaylorFries left a comment

Choose a reason for hiding this comment

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

notifications are sent for creation of projects and appropriate statuses changes (to: submitted, submitted exemption, approved for erp, denied, cancelled, in erp)
no issues detected.

@GrahamS-Quartech GrahamS-Quartech merged commit 0a9742c into main Jul 24, 2024
9 checks passed
@GrahamS-Quartech GrahamS-Quartech deleted the PIMS-1756-TemplateHyperlinksFormatting branch July 24, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants