Sfoglia il codice sorgente

Added an automatic naming for the change tickets based on their Id (Same as for Incident tickets but starting with C-).

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@132 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 15 anni fa
parent
commit
1c87c6166b
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      business/ChangeMgmt.business.php

+ 13 - 0
business/ChangeMgmt.business.php

@@ -179,6 +179,19 @@ class bizChangeTicket extends cmdbAbstractObject
 		$this->Set('last_update', time());
 		return true;
 	}
+
+	public function ComputeFields()
+	{
+		if ($this->GetKey() > 0)
+		{
+			$sName = sprintf('C-%06d', $this->GetKey());
+		}
+		else
+		{
+			$sName = "Id not set";
+		}
+		$this->Set('name', $sName);
+	}
 }
 
 ////////////////////////////////////////////////////////////////////////////////////