Skip to content

Fix softwarelicense - #587

Merged
Rom1-B merged 7 commits into
mainfrom
fix_softwarelicense
Aug 17, 2026
Merged

Fix softwarelicense#587
Rom1-B merged 7 commits into
mainfrom
fix_softwarelicense

Conversation

@stonebuzz

@stonebuzz stonebuzz commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

Fixes: !44001

The Order plugin implements a specific workflow for SoftwareLicense items:

  • Licenses are grouped by price/discount.
  • Bulk operations are performed through queryRef, with the number field being incremented instead of creating individual physical assets.

Under these conditions, performing a bulk reception triggers the "Operation failed" error.

The issue originates in updateReceptionStatus(). For the SoftwareLicense case processed through a bulk action, receptionAllItem() is called, but $ma->itemDone() is never executed. In contrast, the else branch correctly invokes $ma->itemDone(). As a result, GLPI automatically marks the item as failed, which explains the second error message displayed to the user.

In addition, reception cancellation does not take into account the specific behavior of SoftwareLicense items. The current implementation applies a generic cancellation process, whereas software licenses are managed globally at the license level rather than through individual received items. Consequently, the cancellation workflow is inconsistent with the dedicated SoftwareLicense handling logic.

Screenshots (if appropriate):

@stonebuzz
stonebuzz requested a review from Rom1-B June 15, 2026 09:24
Comment thread inc/link.class.php Outdated
@stonebuzz
stonebuzz marked this pull request as draft June 29, 2026 07:46
@stonebuzz
stonebuzz force-pushed the fix_softwarelicense branch from cd99ff8 to b4a2276 Compare August 17, 2026 08:09
@stonebuzz
stonebuzz requested a review from Rom1-B August 17, 2026 08:09
@stonebuzz stonebuzz self-assigned this Aug 17, 2026
@stonebuzz stonebuzz added the bug label Aug 17, 2026
@stonebuzz
stonebuzz marked this pull request as ready for review August 17, 2026 08:10
Comment thread inc/link.class.php Outdated
Comment thread inc/link.class.php
@stonebuzz
stonebuzz requested a review from Rom1-B August 17, 2026 09:26
@Rom1-B
Rom1-B merged commit 5fe156e into main Aug 17, 2026
3 checks passed
@Rom1-B
Rom1-B deleted the fix_softwarelicense branch August 17, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants