N°962: TagSet Fix Attribute definition

SVN:b931[6028]
This commit is contained in:
Eric Espié
2018-08-28 14:16:01 +00:00
committed by Pierre Goiffon
parent d40ffd944f
commit cd2ea3793e
7 changed files with 15 additions and 5 deletions

View File

@@ -1169,7 +1169,7 @@ class RestUtils
{
if (!is_array($value))
{
throw new Exception("A tag set must be defined by an array of objects");
throw new Exception("A tag set must be defined by an array of tag codes");
}
$value = $oAttDef->FromJSONToValue($value);
}

View File

@@ -5932,7 +5932,7 @@ class AttributeTagSet extends AttributeString
*/
public function MakeRealValue($proposedValue, $oHostObj)
{
$oTagSet = new ormTagSet($this->GetHostClass(), $this->GetCode());
$oTagSet = new ormTagSet(MetaModel::GetAttributeOrigin($this->GetHostClass(), $this->GetCode()), $this->GetCode());
if (is_string($proposedValue) && !empty($proposedValue))
{
$aTagCodes = explode(' ', "$proposedValue");

View File

@@ -25,7 +25,6 @@
* Time: 14:35
*/
require_once('dbobjectiterator.php');
final class ormTagSet
{
@@ -291,4 +290,8 @@ final class ormTagSet
return implode(' ',$this->GetValue()) === implode(' ', $other->GetValue());
}
public function GetTagDataClass()
{
return MetaModel::GetTagDataClass($this->sClass, $this->sAttCode);
}
}

View File

@@ -1500,6 +1500,9 @@
<item id="priority">
<rank>40</rank>
</item>
<item id="tagfield">
<rank>76</rank>
</item>
</items>
</item>
<item id="fieldset:Ticket:contact">

View File

@@ -284,6 +284,9 @@
<item id="operational_status">
<rank>75</rank>
</item>
<item id="tagfield">
<rank>76</rank>
</item>
<item id="start_date">
<rank>80</rank>
</item>

View File

@@ -76,7 +76,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:Ticket/Attribute:private_log+' => '',
'Class:Ticket/Attribute:contacts_list' => 'Contacts',
'Class:Ticket/Attribute:contacts_list+' => 'All the contacts linked to this ticket',
'Class:Ticket/Attribute:tagfield' => 'Tag Test',
'Class:Ticket/Attribute:tagfield' => 'Tag',
'Class:Ticket/Attribute:functionalcis_list' => 'CIs',
'Class:Ticket/Attribute:functionalcis_list+' => 'All the configuration items impacted by this ticket. Items marked as "Computed" have been automatically marked as impacted. Items marked as "Not impacted" are excluded from the impact.',
'Class:Ticket/Attribute:workorders_list' => 'Work orders',

View File

@@ -63,7 +63,8 @@ Dict::Add('FR FR', 'French', 'Français', array(
'Class:Ticket/Attribute:private_log+' => '',
'Class:Ticket/Attribute:contacts_list' => 'Contacts',
'Class:Ticket/Attribute:contacts_list+' => '',
'Class:Ticket/Attribute:functionalcis_list' => 'CIs',
'Class:Ticket/Attribute:tagfield' => 'Etiquette',
'Class:Ticket/Attribute:functionalcis_list' => 'CIs',
'Class:Ticket/Attribute:functionalcis_list+' => 'Tous les éléments de configuration impactés par ce ticket. Les éléments marqués comme "Calculés" sont le résultat du calcul de l\'analyse d\'impact. Les éléments marqués comme "Non impactés" sont exclus de cette analyse.',
'Class:Ticket/Attribute:workorders_list' => 'Tâches',
'Class:Ticket/Attribute:workorders_list+' => '',