Skip to content

Sorting by last editing user in process and task list also filters the list #6904

@thomaslow

Description

@thomaslow

Describe the bug
When sorting either tasks or processes via the column "Last editing user", the list is not only sorted but also filtered. Any processes or tasks that were never assigned to any user are not shown any more.

To Reproduce
Steps to reproduce the behavior:

  1. Go to process or task list
  2. Show colum "Last editing user"
  3. Click on column "Last editing user" to sort the list
  4. See that the list now only shows tasks or processes that have a "last editing user"

Expected behavior
The list should also show tasks and processes that were never edited by any user.

Release
Current main
(probably Kitodo.Production 3.9.X, but haven't checked)

Additional context
I suspect that the problem lies in the construction of the HQL query that was introduced with the Hibernate Search update (#6503). When sorting by last edited user, the HQL sort criteria for "Last editing user" resolves to task.processingUser.surname or process.lastTask.processingUser.surname. Since the base query doesn't resolve these table joins, hibernate automatically assumes inner joins, which removes tasks or processes from the list that do not have a processingUser assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions