Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to access statistics from a patron linked to more than one organisation #2697

Closed
pronguen opened this issue Feb 14, 2022 · 3 comments
Assignees
Labels
bug Breaks something but is not blocking client request Issue reported by production libraries f: consortial Related to the consortial structure or functionalities f: permissions Concerns the rights management f: statistics Related to the usage statistics either for pricing or for the libaries reports p-Medium Medium priority (to be solved within 1-2 years)

Comments

@pronguen
Copy link
Contributor

Describe the bug

Impossible to access statistics from a patron linked to more than one organisation.

Details

  • The page /stats/librarian is displayed correctly
  • From this page, downloading the CSV creates an empty file (only 3 columns, empty rows)
  • A specific monthly/yearly page (ex: /stats/25) gives a 500 internal error.

To Reproduce

  1. Create a user that is patron in 2 organisation and librarian in 1
  2. Access the statistics from this user

Expected behavior

The librarian linked to more than one organisation can access the stat of his/her organisation (where he/she is a librarian).

Context

@pronguen pronguen added bug Breaks something but is not blocking f: consortial Related to the consortial structure or functionalities f: permissions Concerns the rights management f: statistics Related to the usage statistics either for pricing or for the libaries reports p-Medium Medium priority (to be solved within 1-2 years) labels Feb 14, 2022
@vgranata
Copy link
Contributor

vgranata commented Feb 15, 2022

As it is implemented so far:

  • a librarian can see only the statistics of his/her libraries.
  • a system librarian can see the statistics of his/her libraries + the libraries in his/her organization.
  • a patron cannot see the statistics.

A librarian or a system librarian can be linked to only one organization.

@pronguen I believe the problem here is the same you reported during your tests when you where logged in with your account which had a patron linked to a different organization than the system_librarian.
If I'm correct this issue should be solved with PR 2661.

@pronguen
Copy link
Contributor Author

@vgranata Great 👍 Please mention this issue in your PR so that it will be closed!

@pronguen
Copy link
Contributor Author

Solved by #2661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks something but is not blocking client request Issue reported by production libraries f: consortial Related to the consortial structure or functionalities f: permissions Concerns the rights management f: statistics Related to the usage statistics either for pricing or for the libaries reports p-Medium Medium priority (to be solved within 1-2 years)
Projects
None yet
Development

No branches or pull requests

3 participants