froxlor / Froxlor

The server administration software for your needs - The official Froxlor development Git repository
http://www.froxlor.org
GNU General Public License v2.0
1.62k stars 455 forks source link

Customer management -> "show notes" displays notes of other customer #1235

Closed mjunghanns closed 6 months ago

mjunghanns commented 6 months ago

As a rule of thumb: before reporting an issue

Describe the bug I have several customers. Some of these have "own notes" on their record. If I use the "show notes" button on these records from within the customer overview, it will, at all customers, display the "own notes" content of the customer, that is at the top most position of the list.

System information

Sorry, I have a German environment so the descriptions could differ from their original English description!

Precondition I have several customers. Some of these customers have information in the field "Own notes", but not every customer has "own notes" added to their record.

To Reproduce Steps to reproduce the behavior:

  1. Navigate to "Resources" -> "Customers"
  2. Click on the upper most "own notes" symbol you'll find under "options". A modal will then open and display the content associated with the selected record. Close the modal after checking.
  3. Scroll down to the next "own notes" symbol, that is associated with a different customer. Click on it. The modal will now present the information that belongs to the upper most record in the list. The modal does not contain the correct content this time.
  4. Scroll down to the next "own notes" symbol, that, again, is associated with a third customer. Same thing here. Once you click on the "show notes" symbol, it is showing the notes content that belongs to the upper most listed customer in the list, that has any "own notes" on their record.

Expected behavior The associated "own notes", if any, should be displayed and not any "random" notes that are belonging to any different customer.

Logfiles If applicable, add log-entries to help explain your problem.

Additional context This seems to be a front-end issue to me, as it does not seem to be related to the customer's id. Once I change the sort order, let's sy if I order by Traffic (asc), another customer with "own notes" is listed first. If I then click on any "show notes" symbol that used to be on top, but now is below due to the changed sort order, the "own notes" content of the NOW on-top customer record is shown. If it was for any customer id/database query I would expect this issue to always show the same content all over the place, regardless of the sort order. Due to privacy reasons I cannot add any screenhots here - sorry!

d00p commented 6 months ago

I'm not able to reproduce this, two customers, each have a custom note. no matter the order I click on them, it shows the correct custom-note

d00p commented 6 months ago

Ah, already fixed in current main (2.2), got it, thanks

d00p commented 6 months ago

Can you validate that the following patch resolves the issue?

FixUndefinedIndexIdInTextCustomerNoteDetailModal.patch

mjunghanns commented 6 months ago

Yes, did the job! This patch solved it. Thanks!