Don't exclude terms to merge from the target list

Created on 9 February 2024, 10 months ago

Problem/Motivation

Steps to reproduce

Right now in the UI you have the list of existing terms that the user will select to merge them.
During our tests, when presented with such a list, the users would select all the terms they want to merge and always include the target term.
So if they have EEUU, E.E.U.U and EE.UU. they will select all 3 hoping to merge them into EE.UU.
However on the following screen with the target term, they will be confused as all previously selected terms would be gone due to this code :

  protected function buildExistingTermsOptions(): array {
    $query = $this->termStorage->getQuery();
    $selected_term_ids = $this->getSelectedTermIds();
    $query->condition('vid', $this->vocabulary->id());
    if (count($selected_term_ids) > 0) {
      $query->condition('tid', $selected_term_ids, 'NOT IN');
    }
    $tids = $query->execute();

The logic is made to prevent merging an existing term into itself, but confuse end users.

Proposed resolution

Remove this exclusion and filter out automatically the target term from the existing terms.

Remaining tasks

MR to be written.

User interface changes

The target list will have a complete list of terms.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇫🇷France tostinni

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024