Support

Expand all | Collapse all

Need to identify cross-project relationships

  • 1.  Need to identify cross-project relationships

    Posted 08-28-2018 18:27
    ​We ended up with thousands of cross-project relationships and need to delete them all because they make traceability reports unreadable.

    I found Harald's posts on how to do this, but I do not want to delete all relationships in a project.

    I am able to list all the relationships for a particular project using REST calls, but I need to be able to identify cross-project relationships

    Thanks,

    Jozef ​


  • 2.  RE: Need to identify cross-project relationships

    Posted 08-29-2018 11:41
    Jozef,
    In order to identify which relationships in a project are cross-project, you can use the API to get all relationships for a project, and also use the optional include functionality to get toItem and fromItem data, then parse out only results for which the 'project' field on the toItem and the fromItem don't match. Get the relationship IDs of all the relationships that meet this condition, then delete them also via the API.

    ------------------------------
    Abby Embree
    Jama Software
    ------------------------------



  • 3.  RE: Need to identify cross-project relationships

    Posted 08-30-2018 06:17
    ​Thanks Abby. I hadn't noticed that both the From and To item had the Project ID listed with them!

    Jozef


  • 4.  RE: Need to identify cross-project relationships

    Posted 08-30-2018 06:56
    ​Actually, I do NOT see the Project ID in the REST reply:

    {
          "id": 42770,
          "fromItem": 340157,
          "toItem": 340159,
          "relationshipType": 4,
          "suspect": false },

    Am I doing something wrong?

    Thanks,

    Jozef



    ------------------------------
    Jozef Vandenmooter
    Perficient
    ------------------------------



  • 5.  RE: Need to identify cross-project relationships

    Posted 08-30-2018 13:19
    That's correct, you will only see the project fields in the item data in the 'linked' section that will be included when you use includes for fromItem and toItem.

    ------------------------------
    Abby Embree
    Jama Software
    ------------------------------



  • 6.  RE: Need to identify cross-project relationships

    Posted 08-31-2018 11:31
    Thanks Abby. I actually resorted to make a separate call for each item to get their project id.

    Jozef

    ------------------------------
    Jozef Vandenmooter
    Perficient
    ------------------------------