- Issue created by @tostinni
- Merge request !21Automatically exclude target term from existing list of terms. → (Open) created by tostinni
- Status changed to Needs review
11 months ago 4:23am 9 February 2024
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.
Remove this exclusion and filter out automatically the target term from the existing terms.
MR to be written.
The target list will have a complete list of terms.
Needs review
2.0
Code