No, that doesn’t actually work for this.
What you need is a min function.
Here’s the result transform to use:
:result-transform (fn [result]
(sort-by
(min
(fn [d] (get d :block/scheduled 99999999) )
(fn [d] (get d :block/deadline 99999999) )
)
result
)
)
Result with or:
Result with min:
Edit: for the second sort column you might want the max I suppose? Idk just an idea.
You could surround it by a (juxt a b)
function.
With a
being the (min ...)
and b
being the (max ...)