Skip to content

Backport #1032 to support/3.2: respect auto_select in unattended installations #1089

Open

Description

@rudnerbjoern

Summary

The conditional module selection bug fixed in #1032 (N°9984, commit 9c6baae) still affects support/3.2.

The fix is already present in develop, but the current support/3.2 branch still selects conditional modules as part of unpackaged extensions before evaluating their auto_select expressions.

Checked against Combodo/iTop branch support/3.2 at da4a81053411314812f5db055391a8e8edc99ed3 on 2026-10-22. The checkout declares iTop core version 3.2.3. Local unit tests use PHP 8.3.6 and PHPUnit 9.6.34; these are test-environment versions, not a claim about an affected deployed installation.

Reproduction at the service level

  1. Provide an eligible, visible unpackaged extension containing a regular module and conditional modules with auto_select expressions false and true.
  2. Leave the extension unspecified in the installation choices.
  3. Run ProcessDefaultModules(), followed by ProcessExtensionModulesNotSpecifiedInChoices() and ProcessAutoSelectModules(), as in the unattended-install flow.
  4. The extension-selection step selects both conditional modules prematurely. The later auto-selection step does not remove the module whose expression evaluates to false.

Expected: the regular module is selected by extension processing; conditional modules are selected only when their auto_select expressions evaluate to true.

Actual on the unpatched 3.2 code: the module with the false expression is also selected.

This reproduction is covered by a PHPUnit regression test. An end-to-end reproduction on an installed iTop instance has not yet been performed.

Proposed backport

Skip modules listed in aAutoSelectModules during ProcessExtensionModulesNotSpecifiedInChoices(), leaving selection to ProcessAutoSelectModules(). This is functionally equivalent to #1032, with an explicit guard and explanatory comment.

The prepared change also adds a regression test covering regular modules and both boolean outcomes. The affected test class passes locally: 31 tests, 106 assertions. Without the guard, the new test fails because both conditional modules are selected prematurely.

A companion PR targeting support/3.2 provides the backport and regression test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions