Support

 View Only
  • 1.  Velocity report to get item's comment of a review

    Posted 04-05-2023 23:38
      |   view attached

    I am working on a contextual velocity report, so I receive a $documentList as input.
    I want to build a table with the following columns
    DocumentKey, DocumentName, ReviewID, ReviewName, DocumentVersionInReview, NumberOfComments, Comments

    So I parse the documentList and for each doc I get all versions
    With each version, I get all the revisions, using the getRevisionsForItemId(version.document.id)
    With each revision, I get all the items in it, using getRevisionItems()
    Then I want to get all comments for each item in the revisionItemList.

    Example
    VSS2x-VBSSVP-788 in V2 has been part of Review REV-620 and 0 comment on it
    VSS2x-VBSSVP-788 in V4 has been part of Review REV-646 and 44 comments on it
    VSS2x-VBSSVP-788 in V8 has been part of Review REV-667 and 1 comment on it

    With the function $commentSource.getRevisionItemCommentCount(revItemId) I am able to distinguish the 3 lines with the revItemId.
    Then I use the $commentSource.getCommentsForItem(revItemId) with the same revItemId and I receive [] for the first and for the second line of example and all the 45 comments for the third line.
    I need the appropriate comments for the appropriate lines.

    I have attached the complete code I am using. Search for the # ERROR # and you will then see the line of code that does not give me what I want

    I have found a script on the github which almost does What I need but the last step I want is not there. Community-Reports/Review Center Reports/Review Details Per Item Context Based at master · jamasoftware-ps/Community-Reports (github.com)



    ------------------------------
    Bertrand Lechevalier
    ------------------------------

    Attachment(s)

    vm
    FK_JAMA_Review_Comments.vm   13 KB 1 version


  • 2.  RE: Velocity report to get item's comment of a review

    Posted 04-11-2023 01:47

    Hi  Bertrand!

    I believe what you want to achieve can only be done if you are reading the createdDate / modifiedDate properties from the comment objects and assign the comments to revisions based on these.

    The getCommentsForItem will not return any comment objects when called using a historic item ID, but will return all comments when called with the "originDocument" id.

    Kind regards




    ------------------------------
    Peter Lampacher
    MED-EL
    Innsbruck
    ------------------------------