Hi,
We are trying to list the issues from specific issuelink:
for exemple we want to list all the issuekeys for issuelink.type.name = “Contient”
and get all the outwards issues on it.
def issueKey = ‘SSDBG-940’
def result = get(‘/rest/api/2/issue/’ + issueKey)
.header(‘Content-Type’, ‘application/json’)
.asObject(Map)
return result.body.fields.issuelinks
we would like to have in te result : {SSDBG-941,SSDBG-942}
Could you help me find the syntax please to add condition to only have all the issuekey from issuelink “Contient” ?
the return of the result.body.fields.issuelinks is :
[
{
“id”: “18509”,
“type”: {
“id”: “10014”,
“name”: “Contient”,
“inward”: “appartient à”,
“outward”: “contient”,
},
“outwardIssue”: {
“id”: “24965”,
“key”: “SSDBG-941”,
“fields”: {
“summary”: “test date - RUN1”,
“status”: {
“description”: “(Migrated on 7 Mar 2023 13:10 UTC)”,
“name”: “Confirmee”,
“id”: “10027”,
“statusCategory”: {
“id”: 2,
“key”: “new”,
“colorName”: “blue-gray”,
“name”: “To Do”
}
},
“issuetype”: {
“id”: “10031”,
“description”: " (Migrated on 17 Oct 2022 15:20 UTC)“,
“name”: “Mission BA”,
“subtask”: false,
“avatarId”: 10313,
“hierarchyLevel”: 0
}
}
}
},
{
“id”: “18510”,
“type”: {
“id”: “10014”,
“name”: “Contient”,
“inward”: “appartient à”,
“outward”: “contient”,
},
“outwardIssue”: {
“id”: “24966”,
“key”: “SSDBG-942”,
“fields”: {
“summary”: “test date - RUN2”,
“status”: {
“description”: “(Migrated on 7 Mar 2023 13:10 UTC)”,
“name”: “Confirmee”,
“id”: “10027”,
“statusCategory”: {
“id”: 2,
“key”: “new”,
“colorName”: “blue-gray”,
“name”: “To Do”
}
},
“issuetype”: {
“id”: “10031”,
“description”: " (Migrated on 17 Oct 2022 15:20 UTC)”,
“name”: “Mission BA”,
“subtask”: false,
“avatarId”: 10313,
“hierarchyLevel”: 0
}
}
}
},
{
“id”: “18511”,
“type”: {
“id”: “10013”,
“name”: “Lié à”,
“inward”: “même groupe que”,
“outward”: “même groupe que”,
},
“outwardIssue”: {
“id”: “24956”,
“key”: “SSDBG-937”,
“fields”: {
“summary”: “test indep”,
“status”: {
“description”: “(Migrated on 7 Nov 2022 11:22 UTC)”,
“name”: “Active”,
“id”: “10023”,
“statusCategory”: {
“id”: 2,
“key”: “new”,
“colorName”: “blue-gray”,
“name”: “To Do”
}
},
“issuetype”: {
“id”: “10039”,
“description”: " (Migrated on 17 Oct 2022 15:20 UTC)",
“name”: “Travaux C1 - BA”,
“subtask”: false,
“avatarId”: 10307,
“hierarchyLevel”: 0
}
}
}
},
{
“id”: “18508”,
“type”: {
“id”: “10019”,
“name”: “Réserve”,
“inward”: “est réservé(e) par”,
“outward”: “réserve”,
},
“inwardIssue”: {
“id”: “24963”,
“key”: “SSDBG-939”,
“fields”: {
“summary”: "test date “,
“status”: {
“description”: “(Migrated on 10 Mar 2023 13:51 UTC)”,
“name”: “Archivee”,
“id”: “10030”,
“statusCategory”: {
“id”: 3,
“key”: “done”,
“colorName”: “green”,
“name”: “Done”
}
},
“issuetype”: {
“id”: “10013”,
“description”: " (Migrated on 17 Oct 2022 15:20 UTC)”,
“name”: “Reservation Phoenix BA”,
“subtask”: false,
“avatarId”: 10323,
“hierarchyLevel”: 0
}
}
}
}
]