Bug 378446

Summary: Moving print job to another printer fails
Product: [Frameworks and Libraries] print-manager Reporter: Michael Weghorn <m.weghorn>
Component: generalAssignee: Daniel Nicoletti <dantti12>
Status: RESOLVED FIXED    
Severity: normal CC: m.weghorn
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 17.04.2
Sentry Crash Report:
Attachments: Patch to fix moving print job to another queue (same as submitted to KDE review board)

Description Michael Weghorn 2017-04-04 21:02:28 UTC
Moving a print job from one print queue to another one fails in print-manager. I just retested with the current git version (master branch at commit 032be7246) on KDE neon.

Steps to reproduce:

* Make sure at least two printers are set up on the system. It is assumed that they are called "firstprinter" and "secondprinter" in the following.
* Pause printer "firstprinter" (e.g. using the "Pause Printer" button in print-manager's view of the queue or using the command "cupsdisable firstprinter")
* create a print job for printer "firstprinter" (e.g. using the command "echo hello | lp -d firstprinter")
* show the queue using print-manager, e.g. by opening the queue from the applet or by directly using the command "kde-print-queue firstprinter"
* try to move the print job to the other printer "secondprinter":
  * right click on the print job in the list
  * Select "Move to" -> "secondprinter"

Actual Result:
A dialog pops up, saying that moving the print job failed: "Failed to move '(stdin)' to 'secondprinter'". When clicking on the "Details" button, it says: "The printer or class does not exist."

Expected result:
The print job should successfully be moved to the other printer and printed on it.

I have worked on a solution quite a while ago and am planning to supply a patch soon.
Comment 1 Michael Weghorn 2017-04-04 21:32:10 UTC
I have now created a review request on KDE's review board: https://git.reviewboard.kde.org/r/130063/

As I have never done this before, I am not sure whether I did everything correctly. Please let me know in case something needs to be done differently or anything is missing.
Comment 2 Michael Weghorn 2017-04-04 21:35:02 UTC
Created attachment 104886 [details]
Patch to fix moving print job to another queue (same as submitted to KDE review board)

I am attaching the patch with the changes that I have also submitted to KDE's review board.
Comment 3 Christoph Feck 2017-05-11 19:40:18 UTC
Git commit 7776714c332e4794f5cdcd53ccbc5eb767e89d0e by Christoph Feck, on behalf of Michael Weghorn.
Committed on 11/05/2017 at 19:35.
Pushed by cfeck into branch 'Applications/17.04'.

Fix moving print job to another printer
FIXED-IN: 17.04.2

REVIEW: 130063

M  +3    -1    libkcups/KCupsRequest.cpp

https://commits.kde.org/print-manager/7776714c332e4794f5cdcd53ccbc5eb767e89d0e