2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-06-12 03:28:37 +00:00

[feature] tags support (#12077)

* Add Tag API endpoints

* Enable filtering by model type

* Remove old tags filters against Part endpoint

* Add generic tags filter for filtering against tagged items

* Add API unit tests for the tags API endpoints

* Create generic mixin class for adding tags support

* Update existing tagged models

* Add tags to more model types

* Enable new tags API filtering for multiple models

* Add support for tag filtering in part table

* Update transfer table filters

* Add tags filter to more places

* Allow multiple values to be selected as filters

* Add a new 'tags' type form field

* Display tags on part page

* tags support for orders

* Add support for SalesOrderShipment

* build order

* Company support

* SupplierPart and ManufacturerPart

* support StockItem

* Enable tag filtering for attachments

* Make tagslist readonly

* docs

* Mark props as read only

* Update API version

* Update CHANGELOG

* force tags to be case insensitive

* Add playwright test for build order tags

* more playwright testing

* Fix docs link
This commit is contained in:
Oliver
2026-06-04 19:38:22 +10:00
committed by GitHub
parent a0b2452ba5
commit 75a08a1e06
78 changed files with 1294 additions and 263 deletions
@@ -120,6 +120,51 @@ test('Build Order - Basic Tests', async ({ browser }) => {
.waitFor();
});
// Test tags filtering against Build Orders
test('Build Order - Tags', async ({ browser }) => {
const page = await doCachedLogin(browser, {
url: 'manufacturing/index/buildorders'
});
// Filter by tag
await page
.getByRole('button', { name: 'segmented-icon-control-table' })
.click();
await clearTableFilters(page);
await page.getByRole('button', { name: 'table-select-filters' }).click();
await page.getByRole('button', { name: 'Add Filter' }).click();
await page.getByRole('combobox', { name: 'Filter' }).fill('tag');
await page.getByRole('option', { name: 'Tags' }).click();
await page.getByRole('combobox', { name: 'Value' }).click();
// Check for expected tags
await page.getByRole('option', { name: 'Furniture' }).waitFor();
await page.getByRole('option', { name: 'Electronics' }).click();
await page.getByRole('option', { name: 'PCB Assembly' }).click();
// Apply the "Furniture" tag filter
await page.getByRole('button', { name: 'apply-tags-filter' }).click();
await page.getByRole('button', { name: 'filter-drawer-close' }).click();
// Check for expected results
await page.getByRole('cell', { name: 'BO0026' }).click();
await page.getByText('100 x 002.01-PCBA | Widget').waitFor();
// Check for tags displayed on BuildOrder detail page
await page.getByText('Electronics', { exact: true }).first().waitFor();
await page.getByText('PCB Assembly', { exact: true }).first().waitFor();
// Edit the build order
await page.keyboard.press('Control+E');
const tagsField = await page.getByRole('combobox', {
name: 'tags-field-tags'
});
await expect(tagsField).toBeVisible();
await page.getByRole('button', { name: 'Cancel' }).click();
});
// Test that the build order reference field increments correctly
test('Build Order - Reference', async ({ browser }) => {
const page = await doCachedLogin(browser, {