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

Email Notification When Stock Level Drops Below Minimum? #8452

Open
2 of 6 tasks
skydiablo opened this issue Nov 8, 2024 · 6 comments
Open
2 of 6 tasks

Email Notification When Stock Level Drops Below Minimum? #8452

skydiablo opened this issue Nov 8, 2024 · 6 comments
Labels
bug Identifies a bug which needs to be addressed question This is a question
Milestone

Comments

@skydiablo
Copy link
Contributor

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

I'm not receiving email notifications when a part's stock level drops below the set minimum, even though email functionality is working, and notifications are enabled in the user settings.

Could this issue (#7866) be addressing the same question?

Steps to Reproduce

  1. Set a minimum stock level for a part.
  2. Ensure email notifications are enabled in the user settings.
  3. Allow the stock level of that part to drop below the minimum.

Expected behaviour

An email notification should be sent when the stock level falls below the minimum threshold.

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

Version Information:

InvenTree-Version: 0.16.8
Django Version: 4.2.15

Database: sqlite3
Debug-Mode: False
Deployed using Docker: False
Platform: Linux-6.8.12-2-pve-x86_64-with-glibc2.31
Installer: None

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}, {'name': 'IPNGenerator', 'slug': 'ipngen', 'version': '0.1'}]

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

Relevant log output

No response

@skydiablo skydiablo added bug Identifies a bug which needs to be addressed question This is a question triage:not-checked Item was not checked by the core team labels Nov 8, 2024
@skydiablo
Copy link
Contributor Author

Alright, I had a notification set on the category, but no notification was triggered on the web interface, nor did I receive an email. When I set the notification directly on the "part," it works as expected. It seems like setting it on the category doesn’t work?

Workflow question: Regarding variants, I would like to receive a notification whenever an individual variant falls below the minimum stock level. If I understand correctly, I now have to activate the notification for each part/variant individually? If I set a minimum stock level on the reference part, a notification is only triggered when the total of all variants falls below the minimum, which makes sense, but how can I receive a notification for each variant without activating them all individually? And setting it on the category doesn’t work at all?

@SchrodingersGat
Copy link
Member

@skydiablo this seems related to these fixes, maybe?

When I set the notification directly on the "part," it works as expected. It seems like setting it on the category doesn’t work?

Could you try to recreate this across a number of different part / category combinations? The notifcation based on subscibred category should be working fine?

@skydiablo
Copy link
Contributor Author

hmmm, i have try to trigger a new notification, no success :( independed how i subscribe to the part. no notification at all. is there any dependecies how long a state have to be, between add and remove the stock items?

@SchrodingersGat
Copy link
Member

For a single given part/user combination, low-stock notifications won't be sent more than once per day. You can try with a different part?

@skydiablo
Copy link
Contributor Author

  • subscribe to most top part category
  • crate a new part in the subscribed category (as template = true)
  • add a variant
  • add a stock
  • define minimum limit to the variant (10)
  • add stock (10)
  • remove stock (5)
    --> nothing happen :(

same as above but remove the category subscription and subscribe direct the variant --> nothing happen :(

@SchrodingersGat
Copy link
Member

You should be able to see if the notification entry has been created, in the admin interface, e.g. http://localhost:8000/admin/common/notificationentry/

(replace "localhost:8000" with your server name)

For example:

Image

@matmair matmair removed the triage:not-checked Item was not checked by the core team label Nov 11, 2024
@matmair matmair added this to the 0.17.0 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies a bug which needs to be addressed question This is a question
Projects
None yet
Development

No branches or pull requests

3 participants