Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Correspondents filter in Document view doesn't filter #47

Open
markusappel opened this issue Nov 15, 2018 · 3 comments
Open

Correspondents filter in Document view doesn't filter #47

markusappel opened this issue Nov 15, 2018 · 3 comments

Comments

@markusappel
Copy link

Expected Behavior

... to see only documents matching the correspondent when selecting one in the document view in the menu on the left

Actual Behavior

... seeing all documents (unfiltered)

Steps to Reproduce the Problem

click on a correspondent to select it

Specifications

More info

  • No errors showing up in the dev console.
  • The API request sent to paperless is e.g. GET /api/documents/?correspondent__slug_0=lemontorge&correspondent__slug_1=contains&tags__slug_1=contains&ordering=-modified&page=1
  • When I try the above command in the browser API in paperless I also get a list of all documents.

Not sure if this is a paperless or a paperless-desktop problem?
Either way, many thanks to the developers of both projects!

@markusappel
Copy link
Author

Hm, I see that this might have to do with a changed django-filter API mentioned here: the-paperless-project/paperless#412
Seems like the API request needs to be something like api/documents/?correspondent__slug__contains=lemontorge now, at least this works in the paperless browser API and a quick change in paperless-desktop revives the filter functionality...

I guess a clean fix would need to check paperless' version and adapt to it?

@thomasbrueggemann
Copy link
Owner

While reading the first lines of your comment I thought: "It would be awesome to retrieve the version number of Paperless, otherwise we'll eventually loose backwards compatibility".
I could imagine a dedicated endpoint in paperless that responds with a version number, or sending the version number as an HTTP header in response to every request. That way Paperless Desktop could initially perform a GET on any ressource of Paperless and determine the version number and if none is returned assume a version number lower than X. Where X is the point in time that the version number retrieval was implemented.

@thomasbrueggemann
Copy link
Owner

Or let the user select the version number in Paperless Desktop

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants