Add updated_at field + database trigger into inventory source item table
Description (*)
update_at field into the stock inventory table
select * from inventory_source_item limit 10;
+----------------+-------------+------------+----------+--------+
| source_item_id | source_code | sku | quantity | status |
+----------------+-------------+------------+----------+--------+
| 1 | default | POS-104002 | 4.0000 | 1 |
| 2 | default | POS-104003 | 2.0000 | 1 |
| 3 | default | POS-124005 | 8.0000 | 1 |
| 4 | default | POS-SFR-6612 | 0.0000 | 1 |
| 5 | default | POS-104004 | 2.0000 | 1 |
| 6 | default | POS-104006 | 1.0000 | 1 |
| 7 | default | POS-104007 | 2.0000 | 1 |
| 8 | default | POS-104008 | 4.0000 | 1 |
| 9 | default | POS-104009 | 4.0000 | 1 |
| 10 | default | POS-104011 | 3.0000 | 1 |
+----------------+-------------+------------+----------+--------+
Expected behavior (*)
Expected behaviour is to add it to the database, and let the database manage the updated_at field on save
Benefits
Currently there is no way of knowing when stock was updated. We're running a sync, and the product update_at isn't changed on stock changes, and the inventory table also is not changed.
This prevents a partial sync to other systems. e.g.
select * from inventory_source_item where updated_at > last_sync_time;
Additional information
Should be available via the api in some fashion, ideally in the export_salable_qty rest api endpoint to allow bulk lookups.
Hi @tschirmer. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
Hello @tschirmer,
Thank you for the report and collaboration!
After going through with the description, it seems to have a feature request. Hence we are marking it as feature request.
If you have a fix for this, you can create a PR for the same. We will be happy to process the same.
Thank you