Skip to content

Conversation

@Godmartinz
Copy link
Member

Description

UGH. This fixes a checkin/checkout email not being sent for licenses.
The boolean check was failing to fire an email because the checkoutable type is license_seat and license_seat does not have a method of checkin_email to check the category if it should send an email.

Added a method to check the license of the license_seat if it should send an email now.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

@Godmartinz Godmartinz requested a review from snipe as a code owner November 13, 2024 21:10
@Godmartinz Godmartinz requested review from marcusmoore and removed request for snipe November 13, 2024 21:10
@what-the-diff
Copy link

what-the-diff bot commented Nov 13, 2024

PR Summary

  • Email Sending Condition Improvement
    The condition that checks when to send an email during the 'checked out' and 'checked in' process has been improved. The process has been simplified and made more readable with the introduction of a new function. This change will make the code easier to understand and maintain.

  • New 'checkoutableShouldSendEmail' Method Introduced
    A new function called 'checkoutableShouldSendEmail' has been added. It contains the rules that check if an email should be sent after checking out or in. This method simplifies the condition check and is specifically used when the instance checked out is a LicenseSeat. This compartmentalized approach to handling logic makes the system more robust and reliable.

@Godmartinz Godmartinz requested a review from snipe November 13, 2024 21:12
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Phew...good stuff 😄

@snipe snipe merged commit 381c6e0 into grokability:develop Nov 13, 2024
9 checks passed
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