Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Incorrect display of hashlists in the super hashlist table #1109

Open
Tracked by #1146
gpascal123 opened this issue Oct 16, 2024 · 3 comments
Open
Tracked by #1146

[BUG]: Incorrect display of hashlists in the super hashlist table #1109

gpascal123 opened this issue Oct 16, 2024 · 3 comments
Assignees
Labels
bug Something isn't working server Hashtopolis API/Server related ui Hashtopolis UI related

Comments

@gpascal123
Copy link

gpascal123 commented Oct 16, 2024

The same hashlists are usually displayed, although different hashlists are assigned to each superhashlist.

In addition, the API returns incorrect entries, sometimes several hashlists are returned, although only one hashlist is assigned to the super hashlist.

API call that returns incorrect results:
http://localhost:8080/api/v2/ui/hashlists?maxResults=25&startsAt=0&expand=hashType,hashlists&filter=format=3&ordering=-_id

In the assignment table (HashlistHashlist) of the database, the hashlists are correctly assigned to the super hashlists, there are no multiple assignments.

Image

@gpascal123 gpascal123 converted this from a draft issue Oct 16, 2024
@gpascal123 gpascal123 added bug Something isn't working server Hashtopolis API/Server related ui Hashtopolis UI related labels Oct 16, 2024
@gpascal123 gpascal123 moved this from To triage to In progress in 🐛 Bug Tracker Oct 23, 2024
@gpascal123 gpascal123 moved this to 📝 Todo in 🍺 Sprint October '24 Oct 23, 2024
@gluafamichl
Copy link
Contributor

There are two bugs:

  • Frontend does not show the correct names of the hashlists, fixed with PR for issue [BUG]: Incorrect display of hashlists in the super hashlist table #1109 on frontend
  • The method getManyToOneRelation in the new API does not handle ManyToOne correctly, all duplicate entries are removed from the results. As soon as a hashlist is contained in more than one superhashlist, the mapping is wrong, because entries are missing in the intermediate mapping. Still has to be fixed.

@gluafamichl
Copy link
Contributor

From my understanding, the function getManyToOneRelationViaIntermediate() in the AbstractModelAPI should be renamed to getManyToManyRelationViaIntermediate, because we are dealing with many to many relations. A superhashlist may refer to several hashlists, but a hashlist can belong to several superhashlists.
And it should be fixed, because if we have a real many to many relationship the assignment from childs to parents is wrong.

  • Superhashlist A contains hashlist X
  • Superhashlist B contains the same hashlist X and hashlist Y
    => Hashlist X is only assigned to Superhashlist B, the relation from X to A gets lost in the API

@gluafamichl gluafamichl moved this from 📝 Todo to 🚧 In progress in 🍺 Sprint October '24 Oct 25, 2024
@gluafamichl gluafamichl moved this from 🚧 In progress to 🧐 Review in 🍺 Sprint October '24 Oct 25, 2024
@jessevz
Copy link
Contributor

jessevz commented Oct 25, 2024

Hi I am pretty sure these API issues are already fixed within the fork im working at, but it is good to test for when we are in the review phase

@ObsidianOracle ObsidianOracle moved this from 🧐 Review to ⏳🙄 Waiting for in 🍺 Sprint January '25 Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Hashtopolis API/Server related ui Hashtopolis UI related
Projects
Status: 🧐 Review
Status: ⏳🙄 Waiting for
Status: 🧐 Review
Status: 🧐 Review
Status: In progress
Development

Successfully merging a pull request may close this issue.

3 participants