Bug 425534 - If a print is currently running, the applet shows wrong description in the subtitle
Summary: If a print is currently running, the applet shows wrong description in the su...
Status: RESOLVED FIXED
Alias: None
Product: print-manager
Classification: Frameworks and Libraries
Component: applet (show other bugs)
Version: 20.08
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-08-19 09:24 UTC by Daniel
Modified: 2020-08-21 18:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.12.0
Sentry Crash Report:


Attachments
a screenshot of the printing applet showing wrong descriptions for all printers (11.90 KB, image/png)
2020-08-19 09:25 UTC, Daniel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2020-08-19 09:24:28 UTC
SUMMARY
If a print is active, the printing applet shows some wrong string for all printers: "0, 1 active jobs". This is a regression since 20.08. Please see the attached screenshot for more details.

STEPS TO REPRODUCE
1. start a print
2. open into printer applet

OBSERVED RESULT
a wrong description is shown for all printers: "0, 1 active jobs"

EXPECTED RESULT
a correct description should be shown, like it was the case in earlier versions

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.8.1-arch1-1
Comment 1 Daniel 2020-08-19 09:25:14 UTC
Created attachment 130992 [details]
a screenshot of the printing applet showing wrong descriptions for all printers
Comment 2 Nate Graham 2020-08-21 15:55:43 UTC
Can confirm. Probably my fault, sorry about that. I'll see what I can do about it.
Comment 3 Nate Graham 2020-08-21 16:01:48 UTC
The string is:

i18np("%1, %2 active job", "%1, %2 active jobs", model.stateMessage, jobsFilterModel.count);

So it looks like model.stateMessage is not returning a human-readable bit of text as we expect. It should say "Printing" or something like that.
Comment 4 Nate Graham 2020-08-21 16:05:35 UTC
Looks like it returns the right text when it's in the idle state though.
Comment 5 Bug Janitor Service 2020-08-21 16:36:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/print-manager/-/merge_requests/4
Comment 6 Nate Graham 2020-08-21 18:43:43 UTC
Git commit 6ba27a6586cf33d8680bce99beb601ff1626ab00 by Nate Graham.
Committed on 21/08/2020 at 16:35.
Pushed by ngraham into branch 'master'.

[applet] Simplify printer list item subtitle

The subtitle currently builds up a complicated string that tells you
thhe number of active and/or inactive jobs. However what you really
care about is the current state: idle or printing, paused, stuck, etc.
I don't think The number of jobs is useful or actionable information.
So let's remove it.

This happens to fix a bug whereby the state is displayed incorrectly.
FIXED-IN: 20.12.0

M  +1    -15   plasmoid/package/contents/ui/PrinterItem.qml

https://invent.kde.org/utilities/print-manager/commit/6ba27a6586cf33d8680bce99beb601ff1626ab00