Application Lifecycle Conductor

 View Only
  • 1.  Default relation for new project

    Posted Apr 18, 2018 01:36 PM

    Hi,

     

    We're using a pooling job (schedule tasks with Remote Record Field Import rule) in order to create a new Project based on CA Change Orders based on some criteria. For this new projects we need to define a default relationship with an existing Iteration Project. Is this possible?

     

    Thanks for your help.

     

    Regards,

    JOHN



  • 2.  Re: Default relation for new project

    Posted May 03, 2018 03:50 PM

    Any suggestions?.

    Thanks for your help.

    Regards,

    JOHN



  • 3.  Re: Default relation for new project

    Broadcom Employee
    Posted May 04, 2018 01:40 PM

    In the script override for the Remote Record Field Importer, you should have something like this:

     

    var importer = new Packages.purescm.vegas.plugins.ALMRemoteRecSynchronizer(

           executingRule,                                         // Mapping Rule

           remId,                                                 // Filter

           extraInfo,                                             // Extra Info

    Packages.purescm.vegas.plugins.StmUtil.getItemTypeName(Packages.purescm.vegas.plugins.StmUtil.getDefectId(), securityContext),                                            // Import To Item Type

           "purescm.vegas.plugins.jira.JiraIssueConnector",     // Connector ID

           null,                                                  // Attachment Filter

           null,                                                  // Attachment Extra Info

           null,                                                  // Attachment Connector ID

           false,                                                 // Allow Delete Local Attachments

           proj,                                                  // Link To Item

           impByRelTypeStr,                                      // Relationship Type

           true,                                                  // Implied Relationship

           excl,                                                  // Rule Exclusion List

           true,                                                  // Do Percent Complete At End

           rulesToken,                                            // Rules Access Token

           securityContext,                                      // Security Context

           true,                                                  // Async Import

           null,                                                  // Field Mapping Listener

           null,                                                  // Attachment Extra Info Decrypt/Encrypt Listener

           null);                                                 // Import Listener

    importer.start();

     

    The highlighted fields control what the imported records will be linked to (e.g. the iteration project should be stored as an item reference in the "proj" variable in the example shown above).



  • 4.  Re: Default relation for new project

    Posted May 07, 2018 04:31 PM

    Hi, thanks for your help.

    By "stored as an item reference in the proj variable", your mean item id or name or something else? Also this doubt apply to impByRelTypeStr (Does this refer to the relation type name or id? )

    Regards,

    JOHN



  • 5.  Re: Default relation for new project

    Broadcom Employee
    Posted May 08, 2018 11:03 AM

    Hi John - an item reference means a variable that is an instance of a item object (e.g. type = Packages.purescm.vegas.engine.Item).  If you have an ID, you can fetch it as follows:

     

    var itemRef = VegasClient.getVegasObject(Packages.purescm.vegas.engine.Item, id, securityContext, 0);



  • 6.  Re: Default relation for new project

    Posted May 08, 2018 05:05 PM

    We're using 

    var proj = VegasClient.getVegasObject(Packages.purescm.vegas.engine.Item, 125, securityContext, 0);

    and then within inporter definition we set:

     

    proj, // Link To Item

    1001, // Relationship Type

    true, // Implied Relationship

     

    But not sure for Relationship Type.

     

    What relationship value should i use (This is an existing Iteration type project (id 125) related to this new work project)

     

    Regards,

    JOHN



  • 7.  Re: Default relation for new project

    Broadcom Employee
    Posted May 08, 2018 09:07 PM

    That should be the relationship type name as a string - e.g. "Related Projects"