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

Fixes where clause operator in artisan checkout command #12905

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR fixes the operator in a where clause used query users that are eligible to have licenses auto-assigned to them in the CheckoutLicenseToAllUsers artisan command.

Previous output:

php artisan snipeit:checkout-to-all --license_id=2 --notify
Checking out 0 of 10 seats for Acrobat

Current output:

php artisan snipeit:checkout-to-all --license_id=2 --notify
You do not have enough free seats to complete this task, so we will check out as many as we can.
Checking out 58 of 10 seats for Acrobat
10 seats left
License 2 seat 11 checked out to admin
9 seats left
License 2 seat 12 checked out to snipe
8 seats left
License 2 seat 13 checked out to helmer.braun
7 seats left
License 2 seat 14 checked out to kstehr
6 seats left
License 2 seat 15 checked out to tatyana.cole
5 seats left
License 2 seat 16 checked out to roberto.kshlerin
4 seats left
License 2 seat 17 checked out to fcartwright
3 seats left
License 2 seat 18 checked out to gabrielle60
2 seats left
License 2 seat 19 checked out to towne.glen
1 seats left
License 2 seat 20 checked out to kuhlman.jadyn
ERROR: No available seats

Side note: It seems like the --notify flag doesn't actually send email notifications to users...I think that is on purpose to avoid sending what could end up being a lot of emails at one time?

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@what-the-diff
Copy link

what-the-diff bot commented Apr 25, 2023

PR Summary

  • Updated the where clause for better comparison
    Changed the where clause to use '=' for accurate and efficient comparisons.

@snipe snipe merged commit 17275cb into snipe:develop Apr 26, 2023
3 checks passed
@snipe
Copy link
Owner

snipe commented Apr 26, 2023

Good catch!

@marcusmoore marcusmoore deleted the fixes/checkout-via-artisan branch April 26, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants