diff --git a/core/bulkchange.class.inc.php b/core/bulkchange.class.inc.php
index cdc14a052..232a4c0a1 100644
--- a/core/bulkchange.class.inc.php
+++ b/core/bulkchange.class.inc.php
@@ -136,6 +136,12 @@ class CellStatus_SearchIssue extends CellStatus_Issue
/** @var string|null $m_sTargetClass */
private $m_sTargetClass;
+ /**
+ * @since 3.1.0 N°5305
+ * @var string $sAllowedValuesSearch
+ */
+ private $sAllowedValuesSearch;
+
/**
* CellStatus_SearchIssue constructor.
* @since 3.1.0 N°5305
@@ -144,13 +150,15 @@ class CellStatus_SearchIssue extends CellStatus_Issue
* @param string $sReason : main message
* @param null $sClass : used for additional message that provides allowed values for current class $sClass
* @param null $sAllowedValues : used for additional message that provides allowed values $sAllowedValues for current class
+ * @param string|null $sAllowedValuesSearch : used to search all allowed values
*/
- public function __construct($sSerializedSearch, $sReason, $sClass=null, $sAllowedValues=null)
+ public function __construct($sSerializedSearch, $sReason, $sClass=null, $sAllowedValues=null, string $sAllowedValuesSearch=null)
{
parent::__construct(null, null, $sReason);
$this->sSerializedSearch = $sSerializedSearch;
$this->m_sAllowedValues = $sAllowedValues;
$this->m_sTargetClass = $sClass;
+ $this->sAllowedValuesSearch = $sAllowedValuesSearch;
}
public function GetDisplayableValue()
@@ -182,6 +190,17 @@ class CellStatus_SearchIssue extends CellStatus_Issue
rawurlencode($this->sSerializedSearch)
);
}
+
+ /**
+ * @since 3.1.0 N°5305
+ * @return null|string
+ */
+ public function GetAllowedValuesLinkUrl(): ?string
+ {
+ return sprintf("UI.php?operation=search&filter=%s",
+ rawurlencode($this->sAllowedValuesSearch)
+ );
+ }
}
class CellStatus_NullIssue extends CellStatus_Issue
@@ -745,6 +764,7 @@ class BulkChange
$oDbSearchWithoutAnyCondition->AllowAllData(false);
$oExtObjectSetWithCurrentUserPermissions = new CMDBObjectSet($oDbSearchWithoutAnyCondition);
$iCurrentUserRightsObjectCount = $oExtObjectSetWithCurrentUserPermissions->Count();
+ $sAllowedValuesOql = $oDbSearchWithoutAnyCondition->serialize();
if ($iCurrentUserRightsObjectCount === 0){
// No objects visible by current user
@@ -785,7 +805,7 @@ class BulkChange
if ($iAllowAllDataObjectCount != $iCurrentUserRightsObjectCount) {
// No match and some objects NOT visible by current user. including current search maybe...
$sReason = Dict::Format('UI:CSVReport-Value-NoMatch-SomeObjectNotVisibleForCurrentUser', $oDbSearchWithConditions->GetClass());
- return new CellStatus_SearchIssue($sSerializedSearch, $sReason, $oDbSearchWithConditions->GetClass(), $allowedValues);
+ return new CellStatus_SearchIssue($sSerializedSearch, $sReason, $oDbSearchWithConditions->GetClass(), $allowedValues, $sAllowedValuesOql);
}
// No match. This is not linked to any right issue
@@ -796,7 +816,7 @@ class BulkChange
}
$value =implode(" ", $aCurrentValueFields);
$sReason = Dict::Format('UI:CSVReport-Value-NoMatch', $value);
- return new CellStatus_SearchIssue($sSerializedSearch, $sReason, $oDbSearchWithConditions->GetClass(), $allowedValues);
+ return new CellStatus_SearchIssue($sSerializedSearch, $sReason, $oDbSearchWithConditions->GetClass(), $allowedValues, $sAllowedValuesOql);
}
protected function PrepareMissingObject(&$oTargetObj, &$aErrors)
diff --git a/dictionaries/en.dictionary.itop.ui.php b/dictionaries/en.dictionary.itop.ui.php
index 204fecaa1..8e05bd527 100644
--- a/dictionaries/en.dictionary.itop.ui.php
+++ b/dictionaries/en.dictionary.itop.ui.php
@@ -722,6 +722,8 @@ We hope you’ll enjoy this version as much as we enjoyed imagining and creating
'UI:CSVImport:AlertMultipleMapping' => 'Please make sure that a target field is mapped only once.',
'UI:CSVImport:AlertNoSearchCriteria' => 'Please select at least one search criteria',
'UI:CSVImport:Encoding' => 'Character encoding',
+ 'UI:CSVImport:ViewAllPossibleValues' => 'View all possible values',
+ 'UI:CSVImport:ViewAllAmbiguousValues' => 'View all ambiguous values',
'UI:UniversalSearchTitle' => ITOP_APPLICATION_SHORT.' - Universal Search',
'UI:UniversalSearch:Error' => 'Error: %1$s',
'UI:UniversalSearch:LabelSelectTheClass' => 'Select the class to search: ',
diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php
index dfb55f530..664deeb07 100644
--- a/dictionaries/fr.dictionary.itop.ui.php
+++ b/dictionaries/fr.dictionary.itop.ui.php
@@ -695,6 +695,8 @@ Nous espérons que vous aimerez cette version autant que nous avons eu du plaisi
'UI:CSVImport:AlertMultipleMapping' => 'Veuillez vous assurer que chaque champ cible est sélectionné une seule fois.',
'UI:CSVImport:AlertNoSearchCriteria' => 'Veuillez choisir au moins une clef de recherche.',
'UI:CSVImport:Encoding' => 'Encodage des caractères',
+ 'UI:CSVImport:ViewAllPossibleValues' => 'Voir toutes les valeurs possibles',
+ 'UI:CSVImport:ViewAllAmbiguousValues' => 'Voir toutes les valeurs ambigues',
'UI:UniversalSearchTitle' => ITOP_APPLICATION_SHORT.' - Recherche universelle',
'UI:UniversalSearch:Error' => 'Erreur : %1$s',
'UI:UniversalSearch:LabelSelectTheClass' => 'Sélectionnez le type d\'objets à rechercher : ',
diff --git a/pages/csvimport.php b/pages/csvimport.php
index f778ac318..ddc2b86ce 100644
--- a/pages/csvimport.php
+++ b/pages/csvimport.php
@@ -485,25 +485,33 @@ try {
break;
case 'CellStatus_SearchIssue':
- $aTableRow[$sClassName.'/'.$sAttCode] = sprintf("%s%s%s%s%s%s",
- '