Allow bulk editing of tags
- Changed "target" parameter type of handleAction in parts table controller to string
- Sanitize input for existing actions which expect an int
- Add tag (dummy) to SelectAPI
- Add tag option to twig template
This is purely theory, nothing of this is tested yet! When implemetation is done, this should solve #178.
Hi @d-buchmann any progress on this? I introduced part-db to a co-worker and we consider to use tags to label parts with RoHS and REACH compliance. So bulk editing of tags would come in handy for our existing 2000+ parts. Can I help with testing or something else?
Indeed I got a little further, but my lack of js skills is holding me back. It feels like the solution is quite hacky all over the place =) The worst thing is that all actions work with an "ID" of the target to be modified, but tags don't have one, so I abuse the ID parameter by putting in the tag verbatim.
I can add and remove tags by entering them in the selector field by hand. The search doesn't work yet. If you try to remove a tag that doesn't exist, or click add when no tag is in the selector, nothing happens. However this is only from my experience, not thoroughly tested. If you intend to test it, please do a full backup first :D Note, this branch is still based on 1.x.
Codecov Report
:x: Patch coverage is 36.58537% with 26 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 57.71%. Comparing base (e1418df) to head (6fd2bb9).
Additional details and impacted files
@@ Coverage Diff @@
## master #940 +/- ##
============================================
- Coverage 57.77% 57.71% -0.07%
- Complexity 7043 7054 +11
============================================
Files 565 565
Lines 23028 23058 +30
============================================
+ Hits 13305 13308 +3
- Misses 9723 9750 +27
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Indeed I got a little further, but my lack of js skills is holding me back. It feels like the solution is quite hacky all over the place =) The worst thing is that all actions work with an "ID" of the target to be modified, but tags don't have one, so I abuse the ID parameter by putting in the tag verbatim.
I can add and remove tags by entering them in the selector field by hand. The search doesn't work yet. If you try to remove a tag that doesn't exist, or click add when no tag is in the selector, nothing happens. However this is only from my experience, not thoroughly tested. If you intend to test it, please do a full backup first :D Note, this branch is still based on 1.x.
Sorry, my skills are even more limited here. I only have a productive instance, so I can't easily test it. But the thing with the "ID" is interesting and fueled my curiosity. While looking into the database to understand your point I found out that it's currently easier for me to do it directly in database. So I used a SQL statement to add the tags for the parts that need it. But I still think your pull-request is useful. Thanks for your inspiration.