Open sldblog opened 2 years ago
Variables in our email templates are not consistent. This leads to unnecessary code duplication.
This leads to dealing with errors like EventException: NullPointerException: null; while processing ReferralEvent more difficult (there's no assignee).
With camelCase:
https://github.com/ministryofjustice/hmpps-interventions-service/blob/bf2b2519cdd175c1882b32627c7d1a78bcef432a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsinterventionsservice/service/notifications/ReferralNotificationService.kt#L71-L73
With snake_case:
https://github.com/ministryofjustice/hmpps-interventions-service/blob/bf2b2519cdd175c1882b32627c7d1a78bcef432a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsinterventionsservice/service/notifications/ReferralNotificationService.kt#L85-L87
Standardise on one casing. Use it everywhere.
This requires duplicating templates until the switchover happens.
Short problem statement; why is this a problem?
Variables in our email templates are not consistent. This leads to unnecessary code duplication.
This leads to dealing with errors like EventException: NullPointerException: null; while processing ReferralEvent more difficult (there's no assignee).
Link to different approaches
With camelCase:
https://github.com/ministryofjustice/hmpps-interventions-service/blob/bf2b2519cdd175c1882b32627c7d1a78bcef432a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsinterventionsservice/service/notifications/ReferralNotificationService.kt#L71-L73
With snake_case:
https://github.com/ministryofjustice/hmpps-interventions-service/blob/bf2b2519cdd175c1882b32627c7d1a78bcef432a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsinterventionsservice/service/notifications/ReferralNotificationService.kt#L85-L87
Do you have a proposed solution? Why?
Standardise on one casing. Use it everywhere.
This requires duplicating templates until the switchover happens.