culturesofknowledge / emlo-project

Repository to manage the upgrade, development and maintenance of EMLO
0 stars 0 forks source link

Not all sort by fields work #280

Closed J4bbi closed 1 year ago

J4bbi commented 1 year ago

Removing CofkUnionQueryableWork and making searches of related entities means that some sort by values have stopped working.

Work:

People:

Location:

J4bbi commented 1 year ago

@philipkcl , I can not think of a way to sort by the related fields

I thought of annotating when passing to the update_query

https://github.com/culturesofknowledge/site-edit-2/blob/892a97317bdc7e32450f8e2b113c4a0c23581236/work/views.py#L1242

but I could not come up with a way to sort only on those related cofkworkpersonmap persons that had a relationshiptype "created"

can you think of an way to order by these fields?

philipkcl commented 1 year ago

did this problems can be find in feedback doc? if yes, what is original description look like ?

some fields can be filter and sorting byannotate

but some fields have no meaning to be sort e.g. related resources, other details should be remove from sort options or discuss with Client

J4bbi commented 1 year ago

No, this wasn't in the feedback doc.

Just something I observed.

Yes, I suspected annotate could do it but it needs to be a conditional annotation and I couldn't manage to come up with one that works.

I suppose sorting by related resources or other details has little to no utility, good point