Glad to see that you guys are using the list builder.
A few minor comments:
1) You can get template::list::orderby_clause to spit out the 'order by' part as well by adding the switch -orderby. I just realized that this switch wasn't documented so I added the documentation.
2) I usually specify the call to orderby_clause directly in the query in the .xql file:
select ...
from ...
where ...
[template::list::orderby_clause -name listname -orderby]
3) Your -filters trick to add task_revision_id is unfortunalyte the only way to get the list builder to export variables right now. However, for good measure, you should add an empty list afterwards, like this:
-filters {
task_revision_id {}
}
The reason is that filters normally have specificaion blocks, just like any other element. It doesn't make any difference in this situation, but if you were to add another filter later, you could run into trouble, because the 'name' and 'specification' blocks could be confused.
-filters {
task_revision_id
some_other_filter {
label "This will not do what you want it to"
}
}
4) If you add a 'default_value refvision_id' to your orderby section, you won't have to do if exists_and_not_null orderby part:
-orderby {
revision_id {orderby revision_id}
percent_complete {orderby percent_complete}
start_date {orderby start_date}
end_date {orderby end_date}
default_value revision_id
} \
5) And then to answer your question to me in private email: No, there's currently no way to change the name of the query parameter used for orderby currently named 'orderby'. Which means you cannot have multiple sorted lists on the same page. I'll look into fixing this.
/Lars