OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
1.05k stars 187 forks source link

lpstat.c: Implement successful filter for jobs #830

Closed zdohnal closed 10 months ago

zdohnal commented 10 months ago

lpstat does not have a way how to show successful jobs. One possible solution would be to rewrite the behavior of 'completed' type, but this can cause discrepancies in behavior which some users can expect.

Fixes #828

EDIT: Now lpstat does filtering after receiving response, so no need for new support in cupsd - however lpstat still shows a new argument value.

michaelrsweet commented 10 months ago

If you want to extend "which-jobs" values, you need to propose this on the IPP workgroup mailing list in the Printer Working Group...

zdohnal commented 10 months ago

Found out a bug in setting job->state_reasons - they are always 'proccessing-to-stop-point', because we always call cupsdSetJobState() from finalize_job() with forcing the status update. I'll send patch as well.

zdohnal commented 10 months ago

@michaelrsweet I've changed it - there is ternary operator when I construct the request and putting which-jobs in.