[cups] Completed jobs returned older first in 2.0?

Alex Korobkin korobkin+cups at gmail.com
Wed Feb 1 13:24:10 PST 2017


Looks like sorting order was reverted again to pre-2.0 way in 2.2.2. Now
all jobs in Web UI are sorted in ascending order, and completed jobs in
descending. Thank you.

On Fri, Sep 11, 2015 at 9:50 AM, Michael Sweet <msweet at apple.com> wrote:

> Alex,
>
> You might be able to change the default links to printers and jobs to
> include the ORDER parameter, but that's about it.
>
>
> > On Sep 4, 2015, at 12:16 PM, Alex Korobkin <korobkin+cups at gmail.com>
> wrote:
> >
> > Michael,
> >
> > Is it possible to edit jobs.tmpl to make it return completed jobs in
> > descending order by default?
> > I tried all changed that I could think of, but no luck.
> >
> >
> > Here is the file for 2.0.4:
> >
> > {#job_id=0?:
> > <TABLE CLASS="list" SUMMARY="Job List">
> > <THEAD>
> > <TR><TH><A
> > HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&
> amp;FIRST={FIRST}&ORDER={ORDER=dec?dec:asc}">{ORDER=
> dec?<SMALL>&#x25b2;</SMALL>
> > ID <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID
> > <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Name</TH><TH>User</TH><
> TH>Size</TH><TH>Pages</TH><TH>State</TH><TH>Control</TH></TR>
> > </THEAD>
> > <TBODY>
> > {[job_id]
> > <TR VALIGN="TOP">
> > <TD><A HREF="{job_printer_uri}">{job_printer_name}</A>-{job_id}{?phone?
> > ({phone}):} </TD>
> > <TD>{?job_name=?Withheld:{job_name}} </TD>
> > <TD>{?job_originating_user_name=?Withheld:{job_
> originating_user_name}} </TD>
> > <TD>{job_k_octets}k </TD>
> > <TD>{job_media_sheets_completed=0?Unknown:{?job_
> media_sheets_completed}} </TD>
> > <TD>{job_state=3?pending since<BR>{time_at_creation}:{job_state=4?held
> > since<BR>{time_at_creation}:
> > {job_state=5?processing since<BR>{time_at_processing}:
> {job_state=6?stopped:
> > {job_state=7?canceled
> > at<BR>{time_at_completed}:{job_state=8?aborted:completed
> > at<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
> > <EM>"{job_printer_state_message}"</EM>:}</TD>
> > <TD>
> > {job_preserved>0?{job_state>5?
> > <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN"
> > NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN"
> NAME="OP"
> > VALUE="restart-job"><INPUT TYPE="HIDDEN" NAME="job_id"
> > VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri"
> > VALUE="{job_printer_uri}"><INPUT TYPE="SUBMIT" VALUE="Reprint
> > Job"></FORM>:}:}
> > {job_state=4?
> > <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN"
> > NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN"
> NAME="OP"
> > VALUE="release-job"><INPUT TYPE="HIDDEN" NAME="job_id"
> > VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri"
> > VALUE="{job_printer_uri}">
> > <INPUT TYPE="SUBMIT" VALUE="Release Job"></FORM>:}
> > {job_state=3?
> > <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN"
> > NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN"
> NAME="OP"
> > VALUE="hold-job"><INPUT TYPE="HIDDEN" NAME="job_id"
> VALUE="{job_id}"><INPUT
> > TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
> > <INPUT TYPE="SUBMIT" VALUE="Hold Job"></FORM>:}
> > {job_state<7?
> > <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN"
> > NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN"
> NAME="OP"
> > VALUE="cancel-job"><INPUT TYPE="HIDDEN" NAME="job_id"
> > VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri"
> > VALUE="{job_printer_uri}">
> > <INPUT TYPE="SUBMIT" VALUE="Cancel Job"></FORM>
> > <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN"
> > NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN"
> NAME="OP"
> > VALUE="move-job"><INPUT TYPE="HIDDEN" NAME="job_id"
> VALUE="{job_id}"><INPUT
> > TYPE="SUBMIT" VALUE="Move Job"></FORM>:}
> >  </TD>
> > </TR>
> > }
> > </TBODY>
> > </TABLE>
> > }
> >
> >
> >
> >
> >
> >
> > On Tue, Sep 1, 2015 at 5:40 PM, Michael Sweet <msweet at apple.com> wrote:
> >
> >> Alex,
> >>
> >> This is expected; the web UI does its own sorting.
> >>
> >>
> >>> On Sep 1, 2015, at 9:32 AM, Alex Korobkin <korobkin+cups at gmail.com>
> >> wrote:
> >>>
> >>> Thanks Michael. Let's look into completed jobs only. RFC2911 says that
> >>> completed jobs should be returned newest first. I see completed jobs in
> >> the
> >>> Web UI being returned as oldest first. Is it expected or a bug?
> >>>
> >>> On Tue, Sep 1, 2015 at 8:29 AM, Michael Sweet <msweet at apple.com>
> wrote:
> >>>
> >>>> Alex,
> >>>>
> >>>> RFC 2911 only defines the order of 'completed' and 'not-completed'.
> The
> >>>> other "which-jobs" values are defined in PWG 5100.11 without an
> ordering
> >>>> requirement.
> >>>>
> >>>>
> >>>>> On Aug 31, 2015, at 3:24 PM, Alex Korobkin <korobkin+cups at gmail.com>
> >>>> wrote:
> >>>>>
> >>>>> Do you mean https://www.cups.org/str.php?L4396 ?
> >>>>>
> >>>>> It says this:
> >>>>>
> >>>>>    - If the client requests all 'completed' Jobs (Jobs in the
> >>>>>      'completed', 'aborted', or 'canceled' states), then the Jobs are
> >>>>>      returned newest to oldest (with respect to actual completion
> >>>>>      time)
> >>>>>
> >>>>> However, I see oldest to newest when i click "See completed jobs" and
> >>>>> newest to oldest when i click "See all jobs".
> >>>>>
> >>>>> it is slightly confusing and I don't understand why the behavior
> should
> >>>>> differ. RFC doesn't seem to state that.
> >>>>>
> >>>>> On Mon, Aug 31, 2015 at 2:23 PM, Michael Sweet <msweet at apple.com>
> >> wrote:
> >>>>>
> >>>>>> CUPS 2.0 fixed a long-standing bug with the order of jobs that were
> >>>>>> returned so that we are now compliant with RFC 2911's requirements.
> >> You
> >>>>>> can click in the job ID field to reverse the order.
> >>>>>>
> >>>>>>
> >>>>>>> On Aug 31, 2015, at 12:49 PM, Alex Korobkin <
> korobkin+cups at gmail.com
> >>>
> >>>>>> wrote:
> >>>>>>>
> >>>>>>> Hi all,
> >>>>>>>
> >>>>>>> I'm testing CUPS 2.0.4 and noticed that completed jobs in Web UI
> are
> >>>>>>> returned in the ascending order -- older jobs first. This is
> >> different
> >>>>>> from
> >>>>>>> the CUPS 1.7 and earlier versions.
> >>>>>>>
> >>>>>>> Is it just me (I have multiple patches applied over CUPS UI) , or
> is
> >>>> it a
> >>>>>>> new behavior in CUPS 2.x?
> >>>>>>>
> >>>>>>> --
> >>>>>>> -Alex
> >>>>>>> _______________________________________________
> >>>>>>> cups mailing list
> >>>>>>> cups at cups.org
> >>>>>>> https://www.cups.org/mailman/listinfo/cups
> >>>>>>
> >>>>>> _________________________________________________________
> >>>>>> Michael Sweet, Senior Printing System Engineer, PWG Chair
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> cups mailing list
> >>>>>> cups at cups.org
> >>>>>> https://www.cups.org/mailman/listinfo/cups
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> -Alex
> >>>>> _______________________________________________
> >>>>> cups mailing list
> >>>>> cups at cups.org
> >>>>> https://www.cups.org/mailman/listinfo/cups
> >>>>
> >>>> _________________________________________________________
> >>>> Michael Sweet, Senior Printing System Engineer, PWG Chair
> >>>>
> >>>> _______________________________________________
> >>>> cups mailing list
> >>>> cups at cups.org
> >>>> https://www.cups.org/mailman/listinfo/cups
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> -Alex
> >>> _______________________________________________
> >>> cups mailing list
> >>> cups at cups.org
> >>> https://www.cups.org/mailman/listinfo/cups
> >>
> >> _________________________________________________________
> >> Michael Sweet, Senior Printing System Engineer, PWG Chair
> >>
> >> _______________________________________________
> >> cups mailing list
> >> cups at cups.org
> >> https://www.cups.org/mailman/listinfo/cups
> >>
> >
> >
> >
> > --
> > -Alex
> > _______________________________________________
> > cups mailing list
> > cups at cups.org
> > https://www.cups.org/mailman/listinfo/cups
>
> _________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair
>
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups
>



-- 
-Alex



More information about the cups mailing list