Create Action for Views Bulk Operations

Created on 22 October 2019, about 5 years ago
Updated 3 May 2023, over 1 year ago

Problem/Motivation

I have a site with over 5000 tags and when I want to use this module to merge the similair ones, and the forms take too much time to load. The problem is that every time it loads the whole vocabulary into the form elements. Also, selecting a destination term where you cannot filter the results is very hard to use.

Proposed resolution

I'd suggest 2 things:
- make a Views Bulk Operations Action plugin which merges the selected terms. That way, using a view, users can search for duplicates easily and the page loading speed will be much faster because you don't have to load thousands of terms.
- that Action plugin should have a form where you could select an existing destination term or a provide a new term name. Just like the forms now. But I think it would be better if the destination term picking would be an Entity Lookup element instead of the Select form element that is used currently. That way, the whole form could be displayed instantly, we don't have to wait for Drupal to load a form element with thousands of choices. Also, users don't have to scroll a lot to find the destination term, it's easier to type a few characters and that AJAX Entity Lookup element shows the suggested terms immediately.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia kaszarobert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    55 pass
  • I was running into an issue with #9, when selecting more than one term to merge into a new term, duplicate new terms where being created.

    Looking at the check to see if a term exists it looks like it's calling "free_tagging" as the vid to check. Changing that check to look at the vocabulary id seems to fix that. With the vocabulary id in the check it also will check if the term typed into the new input box already exists and do just the regular merge into the existing term.

    Long time lurker here, first time poster, so hopefully I did this correctly!

  • Improving the way I called vocabulary id - moved it to a hidden field on the form.

  • First commit to issue fork.
  • Merge request !26Resolve #3089426 "Create action for" β†’ (Open) created by aleix
  • πŸ‡ͺπŸ‡ΈSpain aleix

    Hi, I just created a MR ... It's about the same thing but is done using the core Actions API with a derivative that could be executed from any view. So I think it's easier because with any terms view it could be called.
    It may be used this in a new view with `/admin/structure/taxonomy/manage/%taxonomy_vocabulary/merge_terms` path that is restricted to a one defined vocabulary.

Production build 0.71.5 2024