The relationship does create correctly - however when reviewing I am getting a strange output via the API - /api/relationships/lYCmgpI5UHe - output is coming back ill formed and looking like this :
While odd this is fine - as I just need to access the relationships via the events - /api/events/Uqn71FfIPYk - i get the following output:
All good - the primary issue comes now in if i need to delete this relationship. By using the data mutation - const mutation = {resource: 'relationships', type: 'delete', id: id, }
This does delete the relationship - as in " /api/relationships/lYCmgpI5UHe" - however the relationship associated with the entity still exists even though the relationship is deleted. How can this relationship detail be removed from the Event using a mutation - tried multiple options but not succeeded.
Will test with the new endpoints format to see if I can get the correct responses out - this is using version 2.39.4.1.
I created a new relationship - and checked the endpath you provided - nowhere in that is the relationship mentioned - however I should be able to get it via
/api/tracker/relationships?event=JW708OHzDhU
On deleting of the relationship however - when I go via this endpoint:
/api/tracker/relationships/JW708OHzDhU
I get this
{
"httpStatus": "Not Found",
"httpStatusCode": 404,
"status": "ERROR",
"message": "Relationship not found for uid: MKTRPwk69qv"
}
However on rerunning the prior endpoint /api/tracker/relationships?event=JW708OHzDhU I am still seeing the relationship:
The only workaround I can do on this - is to run the relationships?event and then do a follow up query if the relationship ID is still valud - but that seems like a lot of processing for this.
Maybe this has to do with “soft deleted” data or cache? Are you able to see the relationship on the frontend? Are there any cases when the deletion isn’t successful yet received a success response?
I’m wondering if this is the case when deleting using the frontend as well? If so then either there’s a reason for that or it’s a bug.
No - relationship is not visible on the frontend - works accurately. Even on manual deletion same process applies - relationship is not found when searching on
/api/tracker/relationships/Y1OChur9PcA
OUTPUT:
{
"httpStatus": "Not Found",
"httpStatusCode": 404,
"status": "ERROR",
"message": "Relationship not found for uid: Y1OChur9PcA"
}
Okay, I think it’s fair to create a bug issue for this. Would you like to create a Jira bug issue on Projects - Jira? Please share the ticket here for follow up and so others can choose to comment or watch [receive notifications on updates to the ticket]…
I’m unsure whether this is a case of needing to create a new ticket - this just needs to be worked on - checked Jira and found this - and I’m experiencing the same issue. While the link is still there and I can see it - now the biggest issue is I cannot relink TEI’s to Events.
We created a bug issue and I have seen AL-Gassim’s comments. No traction. We are now seeing an issue where the creation of relationships simply fails. We cannot discern a particular pattern for when this happens, but it is affecting some of our users. We are trying to diagnose if these issues are related as best we can. We are using the same version as Matthew, 2.39.4.1
I did a workaround by storing the relationship essentially in the DataElements of the relevant program stages - its not pretty but it does the job and as I am implementing a custom frontend it isnt too problematic.