Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-4019

Disable conditions on schedulable parameters

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.LATER
    • 4.8.0
    • None
    • None
    • 1 - Middle term
    • 2 - Normal

      I have the following parameters configuration in a schedulable:

      <param id="definitive" type="boolean">
          <label>Définitif ?</label>
          <description>Définitif ?</description>
      </param>
      <param id="version" type="string">
          <label>Version</label>
          <description>Version</description>
          <disable-conditions>
              <condition id="definitive" operator="eq">true</condition>
          </disable-conditions>
      </param>

      When I'm trying to configure a task on this schedulable, I get the following error in the JS console:

      Uncaught TypeError: field is null
          _addDisableConditionsListeners /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:4043
          activateDisableCondition /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:4000
          each ExtJS
          _initializeDisableConditions /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:4005
          configure /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:2445
          Function ExtJS
          act /plugins/core-ui/resources/js/Ametys/plugins/coreui/schedule/AddTaskButtonController.js:126
          callParent ExtJS
          act /plugins/core-ui/resources/js/Ametys/plugins/coreui/schedule/SelectionAwareAddTaskButtonController.js:38
          executeFunctionByName /plugins/core-ui/resources/js/Ametys.js:416
          onPress /plugins/core-ui/resources/js/Ametys/ribbon/element/ui/ButtonController.js:1167
          ExtJS 19
          constructor /plugins/core-ui/resources/js/Ametys/ui/tool/layout/ZonedTabsToolsLayout.js:98
          ExtJS 3
          setToolsLayout /plugins/core-ui/resources/js/Ametys/tool/ToolsManager.js:594
          <anonymous> /www/index.html?debug.mode=super&foo=0.8711490372668085:186
      ConfigurableFormPanel.js:4043:33
          _addDisableConditionsListeners/plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:4043
          activateDisableCondition /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:4000
          each ExtJS
          _initializeDisableConditions /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:4005
          configure /plugins/core-ui/resources/js/Ametys/form/ConfigurableFormPanel.js:2445
          Function ExtJS
          act /plugins/core-ui/resources/js/Ametys/plugins/coreui/schedule/AddTaskButtonController.js:126
          callParent ExtJS
          act /plugins/core-ui/resources/js/Ametys/plugins/coreui/schedule/SelectionAwareAddTaskButtonController.js:38
          executeFunctionByName /plugins/core-ui/resources/js/Ametys.js:416
          onPress /plugins/core-ui/resources/js/Ametys/ribbon/element/ui/ButtonController.js:1167
          ExtJS 19
          constructor /plugins/core-ui/resources/js/Ametys/ui/tool/layout/ZonedTabsToolsLayout.js:98
          ExtJS 3
          setToolsLayout /plugins/core-ui/resources/js/Ametys/tool/ToolsManager.js:594
          <anonyme> /www/index.html?debug.mode=super&foo=0.8711490372668085:186

      It works if I add the schedulable id before the referenced parameter:

      <condition id="my.schedulable.id$definitive" operator="eq">true</condition>

            Unassigned Unassigned
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: