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

Delete-Files doesn't list files in the right order, if some releases used "v" in the version #427

Open
neilb opened this issue May 7, 2023 · 3 comments
Labels

Comments

@neilb
Copy link
Collaborator

neilb commented May 7, 2023

If an author uses "v" in the version of their distribution, for some releases, then when you go to Delete Files, the files aren't listed in the right order.

Here's an example. The author started off using vanilla release numbers, then used "v" notation for a while (boo), and then dropped the "v" (yay):

plosuring-delete-files

The 0.2 and 0.3 files should appear at the end of the list, but they're in the middle.

@Grinnz
Copy link
Contributor

Grinnz commented May 17, 2023

I expect this is a simple asciibetical filename sort so it looks expected to me. To sort the way suggested could be done via an extracted "distribution version" and sorting that column using version.pm or the numified form, except that such a concept doesn't exist in PAUSE - but using https://metacpan.org/pod/CPAN::DistnameInfo or similar process to extract the filename version would probably be good enough.

@charsbar
Copy link
Collaborator

Note: I implmented this in my local virtual machine. I dropped the current js sorter and sorted files on the serverside using new query parameters (sort_by and sort_order). It worked, until I pretended to be someone else. When I click a link to sort as someone else, pretension is gone. Adding parameters to pretend to the links to sort is bad.
Maybe I need to fix how to pretend before I revisit this.

@ap
Copy link
Contributor

ap commented Apr 27, 2024

Adding parameters to pretend to the links to sort is bad.

FTFY 😉

In our application at $work, pretending to be someone else is done in the cookie. The user_id field of the cookie changes to the ID of the user you are pretending to be, and a real_id field is added with the ID of who you originally logged in as. If you log out while there is a real_id value in your cookie, you do not actually get logged out, it just swaps the value of real_id back into user_id and clears real_id. It is more or less like EUID/UID in Unix.

@rjbs rjbs added the webui label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants