Skip to content

scheduler: Fix typo in have_source check preventing default trays#1649

Open
hissamshar wants to merge 2 commits into
OpenPrinting:masterfrom
hissamshar:master
Open

scheduler: Fix typo in have_source check preventing default trays#1649
hissamshar wants to merge 2 commits into
OpenPrinting:masterfrom
hissamshar:master

Conversation

@hissamshar

Copy link
Copy Markdown

In commit 074526b, the logic for checking whether a job already specified a paper source was refactored into the have_source boolean. However, the De Morgan's inversion for the HPPaperSource attribute was accidentally written as == NULL instead of != NULL.

This caused have_source to erroneously evaluate to true for almost all print jobs (since normal jobs never include the proprietary HPPaperSource attribute). As a result, the scheduler assumed the client had explicitly requested a tray, causing it to skip mapping the queue's DefaultInputSlot into the outgoing job options.

This commit corrects the operator so that have_source correctly evaluates to false when no tray is specified, allowing IPP Everywhere printers to successfully receive their default tray assignments.

Fixes #1636

In commit 074526b, the logic for checking whether a job already specified a paper source was refactored into the `have_source` boolean. However, the De Morgan's inversion for the `HPPaperSource` attribute was accidentally written as `== NULL` instead of `!= NULL`.

This caused `have_source` to erroneously evaluate to `true` for almost all print jobs (since normal jobs never include the proprietary `HPPaperSource` attribute). As a result, the scheduler assumed the client had explicitly requested a tray, causing it to skip mapping the queue's `DefaultInputSlot` into the outgoing job options.

This commit corrects the operator so that `have_source` correctly evaluates to `false` when no tray is specified, allowing IPP Everywhere printers to successfully receive their default tray assignments.

Fixes OpenPrinting#1636
Copilot AI review requested due to automatic review settings July 11, 2026 13:57

This comment was marked as low quality.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@michaelrsweet michaelrsweet self-assigned this Jul 11, 2026
@michaelrsweet michaelrsweet added the investigating Investigating the issue label Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

investigating Investigating the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CUPS Printer Tray Selection Not Being Applied

3 participants