Skip to main content
1-Visitor
August 8, 2013
Question

Passing information from Test result to Defect during Defect Creation

  • August 8, 2013
  • 1 reply
  • 3229 views

Hello,

I am attempting to setup some defect item automation when it is created from a test session via test result editor. I would like to use "Create Related" in Test Result Editor to create a defect. In createing a defect, I would like to setup fields in the defect item based on it being generated from a Test Session.

Is there a way to pass information from the test result to the newly posted defect item that was created via Create Related?

Is there a way to do this via Custom Action? I've run set command via custom action and I don't see any MKSSI_ISSUE0.

It seems that the defect item can be updated after it has been created via defectDeltaBean.getRelatedTestResultBeans(). But this requires a second trigger to run sometime after defect has been created.

There needs to be a getNewRelatedTestResultBeans() function.

    1 reply

    mbohanon1-VisitorAuthor
    1-Visitor
    August 8, 2013

    ...Or is there a way to create a delta bean from testresult trigger and getAddRelatedItems() ?

    16-Pearl
    August 12, 2013

    Hello Mark,

    I please contact Integrity Technical Support to have them investigate this.

    If there is a current solution, I'm sure the entire community would appreciate you posting the findings here.

    Regards,
    Kael

    mbohanon1-VisitorAuthor
    1-Visitor
    April 11, 2014

    Hello Michael,

    The only delta that can be created/operated on in a test result trigger is via postNewIssue. The new issue cannot be modified, it can only be created.

    After discussing with tech support and experimenting I came up with following:

    1. use postNewIssue in new test result trigger. This will create a "blank" item with state=Unspecified when the test result is saved. The test result is related to this new item. Editability and relevancy rules are applied to this item when state=unspecified.
    2. An hourly trigger will query these "blank" items and set them up based on test results/test session information.
    3. The user can see that an item has been created.
    4. The user can edit the item, causing a delta bean trigger to execute, that will setup the item based on the test result/test session information

    My concern now is the following statement in 10.5 release:

    "164188, 939183 You cannot call the postNewIssue() function from a "Test Result is Changed" trigger.

    Note: Calling postNewIssue() from this trigger now generates an error in the server logs stating the function is not supported when called from this trigger. See the PTC Integrity Event Trigger Java Documentation for more details"