
Problem/Motivation
It would be great to have a simple way of sorting actions.
It has been already discussed in #1550092: Allow sorting and grouping of actions for 7.x.
Comment | File | Size | Author |
---|---|---|---|
#11 | sort-vbo-actions-3319079-11.patch | 5.45 KB | hitesh-jain |
#4 | vbo-sort.png | 45.13 KB | plopesc |
#4 | 3319079-sort-actions.patch | 5.56 KB | plopesc |
Comments
Comment #2
plopescComment #3
plopescComment #4
plopescAttaching patch.
Here you can see a screenshot of the results:

Thank you
Comment #5
graber CreditAttribution: graber at Tag1 Consulting for Google commentedA hint here:
From what I remember, config structure allows both sorting actions and using same actions with different custom labels and different preliminary configuration so it's pretty powerful (just try editing view config yml manually and `drush cim`). It's the UI that is lacking implementation and I remember additional AJAX requests in the views modal were causing errors when I was working on this. Hopefully that's not an issue anymore.
Ohh, a patch already.. ok.
Comment #6
plopescThank you for the hints!
Yeah, we only had to manage the sorting at storing the view time. Once the view is saved, all the things are working as expected!
Hope you find the patch useful
Comment #7
ivnishPatch #4 works! Thanks!
Comment #8
graber CreditAttribution: graber at Tag1 Consulting for Google commentedWe'll need to separate the configuration logic from the Views field plugin class as it's growing too big and readability is getting worse. I'll get to that next thing when I'll have a bit break from the paid work. If anyone wishes to handle this earlier feel free to reassign.
Comment #9
ivnishPatch works, but it adds item "weight" to views config and phpunit is warning about "incorrect schema"
Comment #10
graber CreditAttribution: graber as a volunteer commentedNW then.
Comment #11
hitesh-jain CreditAttribution: hitesh-jain at Compuco commentedReroll the patch from https://www.drupal.org/project/views_bulk_operations/issues/3319079#comm... to apply against the 4.2.x branch.
Comment #12
mayaslatinek CreditAttribution: mayaslatinek as a volunteer commentedThe patch applies nicely and does the job.
Comment #13
graber CreditAttribution: graber as a volunteer commentedPlease see #9 before marking this as RTBC again.
We don't need to store weight here at all, it's enough to reorder actions in view config.
Otherwise this is great work and it's very close, hopefully someone will fix the config issue sometime soon.
Comment #15
graber CreditAttribution: graber as a volunteer commentedFixed according to my last comment. No big deal and this'll not hang here forever ;) Thanks all!