Skip to content

Conversation

TimvanSteenbergen
Copy link

Used this module often, as many others before and after me. Great functionality. But wanting to keep my warnings on 0, this module has 5 warnings that can and should be taken care of. So I set out to that task. Got to the root-cause of the warnings: DS_CheckForSetup and improved this not only removing the warnings, but also lots of techdebt:

  • started with 7 decisions and 14 activities and 5 CW0040 warnings, ended with 4 decisions and 8 activities and 0 warnings
  • Fix a hazard: when Encryptionkey is empty, it only warned the user to first set a value to this constant. Now it gives that message in the snippet itself, preventing the user to still use this module and ignore the warning.
  • The above fix also removed one CW0040 warning.
  • removed 3 CW0040 warnings caused by unneccessary call-page-activity. Removed the 3 activities;
  • removed the last CW0040 warning caused by refresh-client of activity Create EmailTemplate;
  • improved the structure by creating EmailSettings_FetchOrCreate. Replaced DS_GetEmailSettings with this logic, only using DS_ when it was called as datasource, and calling the fetchorcreate in the other occurences;
  • reduced the two calls to CountNrOfTemplates to only one;
  • removed superfluous decision at the end of the happy-flow;
  • decision with message '>0' actually compared to >1; changed the message to 'EmailTemplateCount > 1';

Hope you like it, agree with me that this is an improvement and that you will adopt these changes into a new version 11.0.1 or 11.1.0.

timvansteenbergen added 2 commits February 14, 2022 12:42
- started with 7 decisions and 14 activities and 5 CW0040 warnings, ended with 4 decisions and 8 activities and 0 warnings
- Fix a hazard: when Encryptionkey is empty, it only warned the user to first set a value to this constant. Now it gives that message in the snippet itself, preventing the user to still use this module and ignore the warning.
- The above fix also removed one CW0040 warning.
- removed 3 CW0040 warnings caused by unneccessary call-page-activity. Removed the 3 activities.
- removed the last CW0040 warning caused by unneccessary call-page-activity. Removed the 3 activities.
- improved the structure by creating EmailSettings_FetchOrCreate. Replaced DS_GetEmailSettings with this logic, only using DS_ when it was called as datasource, and calling the fetchorcreate in the other occurences.
- reduced the two calls to CountNrOfTemplates to only one
- removed superfluous decision at the end of the happy-flow
- decision with message '>0' actually compared to >1; changed the message to 'EmailTemplateCount > 1'
…ptionkey constant publicly visible, which is a bad idea.
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.

1 participant