sort journal entries also by object #8159

Closed
opened 2025-12-29 20:33:12 +01:00 by adam · 2 comments
Owner

Originally created by @opericgithub on GitHub (Jun 2, 2023).

NetBox version

v3.5.2

Feature type

Change to existing functionality

Proposed functionality

The only two columns in journal entries table, which are not sortable, are "Object" and "Tags". Is there any particular reason for this behaviour? I don't see any obstacle to make these two columns also sortable.

Use case

We use journal entries table as a form of to-do reminder. In fact, this is the list of preparation tasks and activities that are to be done by our technicians before and when they visit any of our multiple sites. Here is an example:

image

The above list is sorted randomly, but we would like to be able to sort it by object column (in this case the particular site), so all activities for one site would be listed in one place (one group). like this:

image

In this way, all the to-do activities for one site would be grouped into one or more consecutive rows.

Database changes

No response

External dependencies

No response

Originally created by @opericgithub on GitHub (Jun 2, 2023). ### NetBox version v3.5.2 ### Feature type Change to existing functionality ### Proposed functionality The only two columns in journal entries table, which are not sortable, are "Object" and "Tags". Is there any particular reason for this behaviour? I don't see any obstacle to make these two columns also sortable. ### Use case We use journal entries table as a form of to-do reminder. In fact, this is the list of preparation tasks and activities that are to be done by our technicians before and when they visit any of our multiple sites. Here is an example: ![image](https://github.com/netbox-community/netbox/assets/65983735/61c60710-db83-4d3c-b7af-d6cf9b46fdd0) The above list is sorted randomly, but we would like to be able to sort it by object column (in this case the particular site), so all activities for one site would be listed in one place (one group). like this: ![image](https://github.com/netbox-community/netbox/assets/65983735/df48234f-e7b2-47b6-904c-61e58e28c124) In this way, all the to-do activities for one site would be grouped into one or more consecutive rows. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurestatus: under review labels 2025-12-29 20:33:12 +01:00
adam closed this issue 2025-12-29 20:33:12 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Jun 4, 2023):

Is there any particular reason for this behaviour? I don't see any obstacle to make these two columns also sortable.

Yes, the ordering is done in the database and Object being a generic foreign key, it's not possible to order them when selecting from the extras_journalentry. The display value, which is what you want to order by, is fetched after the journal entries are fetched and is generated in python code. Ordering after querying the data does not work as pagination would make it inconsistent.

So in short we currently have no way to do what you are requesting.

@kkthxbye-code commented on GitHub (Jun 4, 2023): > Is there any particular reason for this behaviour? I don't see any obstacle to make these two columns also sortable. Yes, the ordering is done in the database and Object being a generic foreign key, it's not possible to order them when selecting from the extras_journalentry. The display value, which is what you want to order by, is fetched after the journal entries are fetched and is generated in python code. Ordering after querying the data does not work as pagination would make it inconsistent. So in short we currently have no way to do what you are requesting.
Author
Owner

@jeremystretch commented on GitHub (Jul 26, 2023):

Closing this out as the proposal does not appear to be feasible, and no solution has been offered.

@jeremystretch commented on GitHub (Jul 26, 2023): Closing this out as the proposal does not appear to be feasible, and no solution has been offered.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8159