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

[FR] Filter part does not allow to handle variants to include or exclude only #8456

Open
3 of 6 tasks
skydiablo opened this issue Nov 8, 2024 · 4 comments
Open
3 of 6 tasks
Assignees
Labels
api Relates to the API enhancement This is an suggested enhancement or new feature question This is a question
Milestone

Comments

@skydiablo
Copy link
Contributor

skydiablo commented Nov 8, 2024

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

in the part section the overview table does not allow to add a filter to handle variants? i can not exclude or include variants!

Steps to Reproduce

try to add a list filter "variants include/exclude" on part view

Expected behaviour

an option to filter variants in parts list view table

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
@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature api Relates to the API and removed bug Identifies a bug which needs to be addressed triage:not-checked Item was not checked by the core team labels Nov 9, 2024
@SchrodingersGat
Copy link
Member

@skydiablo this would be a reasonable addition as a new filter. Would you like to look into this one potentially? It would be a simple first-time issue, I can point you to the right places in code where it would need to be implemented

@skydiablo
Copy link
Contributor Author

Sure, the given Tech Stack is not my, but hold my Beer, how strong could that be 😉

@SchrodingersGat
Copy link
Member

SchrodingersGat commented Nov 11, 2024

Getting Started

Getting setup with a vscode devcontainer is the easiest way to start developing:

https://docs.inventree.org/en/stable/develop/devcontainer/

Backend

You will need to add a new filter attribute to the PartFilter class:

class PartFilter(rest_filters.FilterSet):

You can use the is_revision filter as a starting point:

is_revision = rest_filters.BooleanFilter(

Frontend

Add a new filter option to the PartTable component:

function partTableFilters(): TableFilter[] {

Let me know if you run into any issues or questions!

@matmair matmair changed the title Filter part does not allow to handle varinats to include oder exclude only Filter part does not allow to handle variants to include or exclude only Nov 11, 2024
@matmair matmair changed the title Filter part does not allow to handle variants to include or exclude only [FR] Filter part does not allow to handle variants to include or exclude only Nov 11, 2024
@matmair matmair added this to the 0.17.0 milestone Nov 11, 2024
@matmair
Copy link
Member

matmair commented Nov 11, 2024

@skydiablo I have assigned a provisional milestone, no one will hold you that, this is just for book (and bot) keeping reasons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Relates to the API enhancement This is an suggested enhancement or new feature question This is a question
Projects
None yet
Development

No branches or pull requests

3 participants