Closed sabina-talipova closed 3 months ago
Check in the DB and see if the sort value has actually changed for both links.
If Sort
hasn't changed for one of the links, then the link hasn't actually been modified.
This happens for two identical scenarios in a row. For example, I expect that first Link should have Sort = 1 and second Link should have Sort = 2. When we change their position in the list(reorder two first links), I expect that first Link will have Sort = 2 and second Link has Sort = 1. Should we expect to having a badge in LinkField in this case? In any case something goes wrong, since sometimes we see badge, sometimes not.
To the extent that modified
label reflects the underlying state of the object, I'm not overly fuss about how the sorting works.
I'm not too concern about the sorting algo works under the hood.
Let's say you have item 1, 2, 3 and 4. You change item 2 to come first:
I suspect that part of the problem is that new Link, seem to default to having a Sort
of 1
.
Expected results: New link is at the end of the list. Actual results: New link is in the second spot.
If you look at the DB, you'll find that the new link has a Sort of 1. It's showing up in the second spot because one other link will have a Sort of 1.
I assume that this issue can be solved as part of this issue https://github.com/silverstripe/silverstripe-linkfield/issues/258
Issue was solved by https://github.com/silverstripe/silverstripe-linkfield/pull/262. Close ticket.
Description
Executed on: SC PHP 8.3 Chrome Sink
When sorting links using Drag and Drop, the version label does not always appear on the first link in the list. This behavior is not permanent and can work correctly from case to case.
Steps to reproduce issue:
My expectation that both links should be marked as "Modified".
Acceptance criteria