Skip to content

[Bug]: Off-By-N in relink progress bar #1216

@mm12

Description

@mm12

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha 9.5.6

Operating System & Version

Win11

Description

Relinking entities shows it has already completed relinking n entries successfully, but that it is in the process of attempting to relink the n-1th item.

Image

Expected Behavior

The counter of what item is being attempted should always be the same or higher than the number of matches.
Realistically, it should be updating the window when it attempts to link a new item, then again when it succeeds/fails, so it should be n+1.

I believe the problem lies in src\tagstudio\qt\mixed\relink_entries_modal.py::RelinkUnlinkedEntries,repair_entries, where displayed_text is passed the index, x (which is from src\tagstudio\core\library\alchemy\registries\unlinked_registry.py::UnlinkedRegistry.fix_unlinked_entries)

Changing this to n+1 on the display would work as a fix, however it might be worth updating the window twice, as I mentioned before.

Steps to Reproduce

  1. Start relinking entries where all entries will be relinked successfully
  2. See issue

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions