IzPack
  1. IzPack
  2. IZPACK-799

PackSelectionCondition uses the wrong pack attribute

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: Installer
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The PackSelectionCondition class, and its use in RulesEngineImpl.initStandardConditions() use the Pack.id attribute to identify packs.
      This is the wrong attribute. Pack.id is the localisation identifier, and is optional. Its supposed to be used to derive a pack name for the current locale.
      PackSelectionCondition should be using Pack.name instead.

      The reason it works currently is due to some code in Packager that assigns Pack.name to Pack.id if the id is null.

        Activity

        Hide
        Tim Anderson added a comment -

        There's a few places in the code which make the same mistake:

        • RulesEngineImpl.initStandardConditions()
        • PacksModel
        • PacksPanelAutomationHelper
        • PacksPanelBase
        • TreePacksPanel
        • TreePacksPanelConsole
        Show
        Tim Anderson added a comment - There's a few places in the code which make the same mistake: RulesEngineImpl.initStandardConditions() PacksModel PacksPanelAutomationHelper PacksPanelBase TreePacksPanel TreePacksPanelConsole
        Hide
        Tim Anderson added a comment -

        Pull request is at: https://github.com/izpack/izpack/pull/46

        The PackSelectionCondition class has been changed to require a "name" element instead of a "packid" element e.g.:

           <condition type="packselection" id="packselection1">
                <name>Core</name>
            </condition>
         

        to force existing users to update their conditions.

        Show
        Tim Anderson added a comment - Pull request is at: https://github.com/izpack/izpack/pull/46 The PackSelectionCondition class has been changed to require a "name" element instead of a "packid" element e.g.: <condition type="packselection" id="packselection1"> <name>Core</name> </condition> to force existing users to update their conditions.

          People

          • Assignee:
            Tim Anderson
            Reporter:
            Tim Anderson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: