jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.37k stars 358 forks source link

[BUG] Pagination can cause loss of in-progress document #1704

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the bug Was editing a document in Paperless-NGX, and needed to go reference some other documents for verification. (By Editing - was adding Tags, adjusting type, correspondent, date, etc). I went to the Documents tab and entered my search criteria, and then started using the "next" arrow to go thru the documents until I found the one I wanted. Once I did, I was unable to find my 'open' document to finish editing/tagging.

To Reproduce Steps to reproduce the behavior:

  1. Open A Document and add a tag - DO NOT HIT SAVE
  2. Click on Documents and choose your first document. (You should now have 2 Open Documents like this) image
  3. Use the "Next Button" and go forward 5 documents. On the 5th "next" you will loose access to that in progress document After 4 nexts image

After 5 nexts (notice the document ending in document_1 is gone: image

Expected behavior Option 1 (preferred) - Using the "Next Arrow" should only add the current document into the "Open Documents list". Unless changes were made, the click on "Next Arrow" should close the current document and open the next.

Option 2 - Open/Unsaved Documents should not be bumped off the "Open Documents List" by Pagination. If you try to click the 'X' on an Open & Changed document you get an popup. At minimum pagination should cause this if being bumped.

Relevant information