BUG: Expand API endpoint does not include referencing CallForTenders entities
tillprochaska opened this issue · comments
Describe the bug
When viewing a LegalEntity
that is referenced by a CallForTenders
in the Aleph UI, it doesn’t show a tab that links to the referencing CfT.
For other entity types Aleph displays a link back to the referencing entity. In the following example a Company
entity references an Address
entity via the addressEntity
property.
![Screen Shot 2024-03-26 at 10 24 32](https://private-user-images.githubusercontent.com/1512805/316802038-b9dd2ea9-b893-491d-b95a-81d11ed72c74.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIyMTU1MzMsIm5iZiI6MTcyMjIxNTIzMywicGF0aCI6Ii8xNTEyODA1LzMxNjgwMjAzOC1iOWRkMmVhOS1iODkzLTQ5MWQtYjk1YS04MWQxMWVkNzJjNzQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjlUMDEwNzEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWZlZjcyMjU4MzViZWNmOWYxM2I1OGRmN2MzNWZjM2U0MjIyMjYzZWNhM2IxMWY2MzYyNTA2ZDgxZWVhODliNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.9bSpkZUQlDeAKvmSKY82wB67KCI_SrKuXGy0hyQAUqw)
To Reproduce
Steps to reproduce the behavior:
- Create an investigation
- In the table editor, create a
Company
entity - In the table editor, create a
CallForTenders
entity and add theCompany
entity to thetenderers
property. - Navigate to the
Company
entity (for example by clicking on the "Expand" icon button next to the row in the table editor). - There’s no link back to the CfT.
Expected behavior
There should be a tab named "Tenders" when viewing the Company
entity.
(I’m not entirely sure though if the fact that it’s missing here isn’t due to a UX or technical reason, so it’s worth checking the history of the current implementation.)
Aleph version
3.15.5
Additional context
This is an issue with the /entities/<id>/expand
endpoint of the Aleph API. I have verified that in this case the response for this endpoint doesn’t include CfTs.