This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Update CI version Automatically

I want to update the CI version automatically when we close a release record 

the naming convention will be like displayName_Location_Date, this will be from cm3r table to device file .

 

any help to do this  ?

 

Parents Reply Children
  • lets fix it.

    1) So let's define what fields you use

    Source                         Destination 

    table: cm3r-------------device

    =========fields=========

    rc.version ------------> version ?

    asset ========== display.name ?

    ci.rc =========== display.name ?

     

     Do you need for this trigger start application = trigger.device.mtbf (as i see on your screenshot) ?

     2) About script. Lit's add some print:

    if (!system.functions.same(record.status,oldrecord.status) && record.status=="Closed")
    {
    	print("(1) - cm3r.a.u.Add2Device: Status changed to Closed for Change-" record.number);
    	var TableDevice = new SCFile("device");
    	if (TableDevice.doSelect("display.name=\"" record.ci_rc "\"") == RC_SUCCESS)
           {
    		print("(2) - cm3r.a.u.Add2Device: Found CI with display.name = " record.ci_rc "; Updating Device, set - " record.rc_version);
            	TableDevice.version= record.rc_version;
           }
    }

     

    3) And finally display you FC for this version in cm3r (where you add concatenation for version)

  • Please answer questions to continue resolving your problem.