Support

Expand all | Collapse all

Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

  • 1.  Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 17 days ago
    Hi,

    as preparing for update from 8.36.1 to 8.49, i'm converting our velocity from old to the new velocity.
    With the old velocity
    #set ($docDao = $applicationContext.getBean("documentDao"))
    $docDao.getDocument_DocAttachments($testrun.id) gave me the list of all the attachments from the test run item

    #set ($relDao = $applicationContext.getBean("relationshipDao"))
    $relDao.getDownstreamDocumentIds($testrun.id) did gave me the list of id from downstream item (documented bugs) associating with the test run item.

    but with the new Velocity -
    $DocumentSource.getDownstreamDocumentIds and $DocumentSource. .getDocument_DocAttachments
    always return  a empty array.
    These functions work with other item types but just not with test run.

    Please advice, with the new Velocity, how can I get the downstream, as well as attachment of a test  run.

    Thanks much



    ------------------------------
    Lien Bäcker
    Gira, Giersiepen GmbH & Co. KG
    ------------------------------


  • 2.  RE: Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 16 days ago
    Edited by Chloe Elliott 16 days ago
    Lien:

    Nice to see you again! Thank you for reporting this, this sounds like a defect we have just filed and is currently under review, where $documentSource.getDownstreamDocumentId no longer returns a value. For your records, the defect key is: SOS-DEF-4843.

    The workaround we have found is to: use $documentSource.getRelationshipsForDocument(Integer documentId, boolean isForward) that returns document_document objects and then get the .toDocument.

    I am relating your company with this defect and you can look for the defect key in the release notes for when it is fixed. Let me know if this workaround works for you.

    Best,


    ------------------------------
    Chloe Elliott
    Jama Software
    Portland OR
    ------------------------------



  • 3.  RE: Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 16 days ago
    Chloe:

    Thanks for the workaround to get downstream items of a test run. It works.

    To add additional information to the documented bug, I tested $documentSource.getDownstreamDocumentIds (int id) with different item types. It works with other item types but not for test run. For test run, your suggestion is the solution.

    I find two more functions of $documentSource which do not work with the test run item type - to get attachment and to get versions. I'm looking for the workaround for these also.

    Item type: Test run

    other Item types such as Test Case

    To get Attachment using $documentSource. getDocument_DocAttachments (int id)

    Always return with empty array

    Works

    Result [DocumentDocAttachProxy{}] 

    To get Versions using documentSource. getAllVersionsByDocumentId (int id)

    Always return with empty array

    Works

    Result [VersionProxy{}, VersionProxy{}, VersionProxy{}, VersionProxy{}, VersionProxy{}, VersionProxy{}]

     













    ------------------------------
    Lien Bäcker
    Gira, Giersiepen GmbH & Co. KG
    ------------------------------



  • 4.  RE: Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 16 days ago
    Thank you, @Lien, for point out those issues.
    We also experienced ​​SOS-DEF-4843 and will see if the other functions are relevant for us as well!

    ------------------------------
    Anna Henke
    MeVis BreastCare GmbH & Co. KG
    ------------------------------



  • 5.  RE: Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 12 days ago
    Hi,

    Since $documentSource. getDocument_DocAttachments (int id) does not work for test run item type, what would be the workaround to get attachment for test run items? 

    ------------------------------
    Lien Bäcker
    Gira, Giersiepen GmbH & Co. KG
    ------------------------------



  • 6.  RE: Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 11 days ago
    Lien:

    For the Test Runs try using:  .getRelationshipsForDocument instead of  .getDownstreamDocumentIds.

    Let me know if this helps,


    ------------------------------
    Chloe Elliott
    Jama Software
    Portland OR
    ------------------------------



  • 7.  RE: Velocity report with 8.49 - $DocumentSource.getDownstreamDocumentIds and .getDocument_DocAttachments could not get the Downtream aund Attachment from items with type Test Run

    Posted 11 days ago
    Hi Chloe,

    the workaround you mentioned did help to get the downstream relationship of a test run.

    But I'm also looking for also a function to return the attachment of a test run, since $documentSource. getDocument_DocAttachments (int id) does not work for test runs



    ------------------------------
    Lien Bäcker
    Gira, Giersiepen GmbH & Co. KG
    ------------------------------