Skip to content

Incorrectly count of minimal quantity of Asset. #14546

@dboissat

Description

@dboissat

Debug mode

Describe the bug

The minimal quantity feature for asset is useful for finding out when you are approaching the end of your stock and when you need to buy more.
But currently, the count is incorrect and seems perform only a comparaison between "Deployed" devices versus all devices of the models, without check the "Archived" or "Undeployable" status.

Over the years, we have more "archived" or "undeployable" devices but that we don't want to delete to keep a record.

Reproduction steps

On the demo :

  1. List "XPS 13" assets: 5 device are created.
  • 1 deployed
  • 4 ready to deploy
  1. Add minimal quantity to 3 on the model "XPS 13".
  2. Change status of 2 devices:
  • One to Archived
  • One to another "Undeployable" status as "Broken - Not Fixable"
  1. Now you have only 2 device "Ready to deploy" but no minimal alert quantity.
  2. Change the minimal quantity to 5 on the model "XPS 13"
  3. You have "4 remaining".

=> Only "Deployed" status seems used.

Expected behavior

On our side, we consider the "pending" status type as into our stock and the "Deployable" status for device "configured" and ready to be installed. But it's maybe not the more common use.

Solution 1:
The feature count all devices "Deployed" versus "Deployable" and "Pending" and exclude "Undeployable" and "Archived".
We obtain the number of devices in "Pending" or "Deployable" into our stock. Not perfect, but closer to what's needed.

Solution 2:
We have the option to personalize how the feature count into the admin configuration tab with two lists : "Status to included" and "Status to excluded".
So everyone can configure how the alert works to suit their needs.

Screenshots

snipe-it_suggest

Snipe-IT Version

v6.3.4 build 13139 (g6f9ba6ede)

Operating System

Linux

Web Server

IDK

PHP Version

8.1.27

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions