[otrs-cvs] ITSMConfigItem/Kernel/System/ITSMConfigItem Version.pm, 1.38, 1.39

CVS commits notifications of OTRS.org cvs-log at otrs.org
Sat Apr 26 11:58:22 GMT 2008


Comments:
Update of /home/cvs/ITSMConfigItem/Kernel/System/ITSMConfigItem
In directory lancelot:/tmp/cvs-serv818/Kernel/System/ITSMConfigItem

Modified Files:
	Version.pm 
Log Message:
Improved attribute checks of VersionAdd().

Author: mh

Index: Version.pm
===================================================================
RCS file: /home/cvs/ITSMConfigItem/Kernel/System/ITSMConfigItem/Version.pm,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** Version.pm	23 Apr 2008 16:41:32 -0000	1.38
--- Version.pm	26 Apr 2008 11:58:16 -0000	1.39
***************
*** 381,384 ****
--- 381,420 ----
      }
  
+     # get deployment state list
+     my $DeplStateList = $Self->{GeneralCatalogObject}->ItemList(
+         Class => 'ITSM::ConfigItem::DeploymentState',
+     );
+ 
+     return if !$DeplStateList;
+     return if ref $DeplStateList ne 'HASH';
+ 
+     # check the deployment state id
+     if ( !$DeplStateList->{ $Param{DeplStateID} } ) {
+ 
+         $Self->{LogObject}->Log(
+             Priority => 'error',
+             Message  => "No valid deployment state id given!",
+         );
+         return;
+     }
+ 
+     # get incident state list
+     my $InciStateList = $Self->{GeneralCatalogObject}->ItemList(
+         Class => 'ITSM::ConfigItem::IncidentState',
+     );
+ 
+     return if !$InciStateList;
+     return if ref $InciStateList ne 'HASH';
+ 
+     # check the incident state id
+     if ( !$InciStateList->{ $Param{InciStateID} } ) {
+ 
+         $Self->{LogObject}->Log(
+             Priority => 'error',
+             Message  => "No valid incident state id given!",
+         );
+         return;
+     }
+ 
      # quote
      $Param{Name} = $Self->{DBObject}->Quote( $Param{Name} );
***************
*** 392,395 ****
--- 428,434 ----
      );
  
+     return if !$ConfigItem;
+     return if ref $ConfigItem ne 'HASH';
+ 
      # insert new version
      my $Success = $Self->{DBObject}->Do(


More information about the cvs-log mailing list