✨(admin) derive the source user from the selection when transferring documents

Abierto
#2,913 0 comentarios 0 reacciones 2 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@lunika ya está trabajando en esto.

Desde el 26/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

backend
What problem do you want to fix?

In the admin, the "Transfer to another user" action asks the admin to pick the source user ("from") by hand, although the documents are already selected. This leads to mistakes:

  • when the selected documents have different creators, only the documents of the chosen user change creator, the others are silently left as they are;
  • when the chosen source user has nothing to do with the selection, nothing is transferred, but the confirmation banner is still green ("0 documents and 0 accesses transferred").
Image
Possible solution?

The source user comes from the selection. The transfer screen lists the selected documents grouped by creator, under the explanation text:

  • creator A
    • document 1
    • document 2
  • creator B
    • document 3
One creator

The "from" field shows that creator and cannot be edited. The admin only chooses the "to" user.

Several creators
  • A message under the explanation says the selection contains several creators and asks the admin to choose the one to transfer from.
  • The "from" field is prefilled with the creator who has the most selected documents.
  • The "from" field stays editable: the admin can type to pick another creator of the selection.
  • Only the documents of the chosen creator change creator. The documents of the other creators are left as they are, and the confirmation message says so.
Given an admin selects documents that all have the same creator
When they run the "Transfer to another user" action
Then the selected documents are listed under their creator
And the "from" field shows that creator and cannot be edited
And the admin only has to choose the "to" user to transfer

Given an admin selects documents created by different users
When they run the "Transfer to another user" action
Then the selected documents are listed grouped by creator
And a message says the selection contains several creators and asks to choose one
And the "from" field is prefilled with the creator who has the most selected documents

Given the selection contains several creators
When the admin changes the "from" field to another creator of the selection and transfers
Then only the documents of that creator and their accesses are transferred
And the confirmation message says how many selected documents were left untouched

Given the admin submits a transfer
When no document and no access is transferred
Then the confirmation banner is red (error) instead of green
And it says nothing was transferred

Implementation lead: TransferDocumentsForm and DocumentAdmin.transfer_documents in src/backend/core/admin.py, and the template core/templates/core/admin/transfer_documents.html. Use messages.ERROR in message_user when nothing was transferred.

Do you have an alternative?

Select the documents of a single creator at a time and pick the right creator by hand in the "from" field.

Upload

No response

Contact Details

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
Lenguaje dominante
TypeScript
Estrellas
17k
Forks
705
Merge medio
4 d 13 h
PR fusionados (30 d)
47

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de suitenumerique/docs

Todos los issues de suitenumerique/docs

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.