Procházet zdrojové kódy

N°807 Portal: add_to_list can now be used in action rules (Note: Works only for IndirectLinkedSet, not LinkedSet)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4660 a333f486-631f-4898-b8df-5754b55c2be0
glajarige před 8 roky
rodič
revize
fba73bf449

+ 2 - 2
sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php

@@ -499,7 +499,7 @@ EOF
 			}
 
 			$aItemProperties = array(
-				'id' => $oItem->GetKey(),
+				'id' => ($this->oField->IsIndirect() && $oItem->IsNew()) ? -1*$oRemoteItem->GetKey() : $oItem->GetKey(),
 				'target_id' => $oRemoteItem->GetKey(),
 				'name' => $oItem->GetName(),
 				'attributes' => array()
@@ -529,7 +529,7 @@ EOF
 			}
 			
 			$aItems[] = $aItemProperties;
-			$aItemIds[] = array('id' => $oItem->GetKey());
+			$aItemIds[] = array('id' => $aItemProperties['id']);
 		}
 	}