snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Asset checkin with API doesn't send checkin notification

Open loganhawker opened this issue 5 years ago • 2 comments

Server (please complete the following information):

  • Snipe-IT Version 5.1.4
  • OS: Windows Server 2019
  • Web Server: WAMP/Apache
  • PHP Version 7.4.9

Is your feature request related to a problem? Please describe. I use a spreadsheet with a script to bulk checkin assets. We have been using the asset checkin notifications as a "receipt" for the students. But I just found out that using the API to checkin does not send the email.

Describe the solution you'd like Include CheckinAssetNotification in the checkin function for the API

I'm not sure if this is excluded for a reason but if it would be a simple fix that would be awesome.

Describe alternatives you've considered The only other alternative would be checking in the assets one by one through the website.

Additional context image

loganhawker avatar Jun 05 '21 01:06 loganhawker

@inietov can you confirm this locally for me please? We don’t send notifications out through the controllers, we send them out through the logger, so I’m not sure how this would happen except if the category itself is set to not send emails.

snipe avatar Jun 05 '21 15:06 snipe

Yeah, I could reproduce it in my local. The $asset->logCheckin() used to send notifications, but now only writes in the Log Action, so I added the event CheckoutableCheckedIn that I think is now the preferred way to do it. A PR is ready to be reviewed :).

inietov avatar Jun 08 '21 18:06 inietov