File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 5454use Ticket_User ;
5555use Search ;
5656use SLA ;
57+ use SLM ;
5758use OLA ;
5859use QuerySubQuery ;
5960use QueryUnion ;
@@ -89,6 +90,7 @@ public function showForm(array $options): void {
8990 $ this ->question ->fields ['_tree_root_selectable ' ] = $ decodedValues ['selectable_tree_root ' ] ?? '0 ' ;
9091 $ this ->question ->fields ['_tree_max_depth ' ] = $ decodedValues ['show_tree_depth ' ] ?? Dropdown::EMPTY_VALUE ;
9192 $ this ->question ->fields ['_show_ticket_categories ' ] = isset ($ decodedValues ['show_ticket_categories ' ]) ? $ decodedValues ['show_ticket_categories ' ] : 'both ' ;
93+ $ this ->question ->fields ['_show_service_level_types ' ] = isset ($ decodedValues ['show_service_level_types ' ]) ? $ decodedValues ['show_service_level_types ' ] : SLM ::TTO ;
9294 $ this ->question ->fields ['_entity_restrict ' ] = $ decodedValues ['entity_restrict ' ] ?? self ::ENTITY_RESTRICT_FORM ;
9395 $ this ->question ->fields ['_is_tree ' ] = '0 ' ;
9496 $ this ->question ->fields ['_is_entity_restrict ' ] = '0 ' ;
@@ -514,8 +516,8 @@ public function prepareQuestionInputForSave($input) {
514516 } else if ($ input ['itemtype ' ] == SLA ::getType ()
515517 || $ input ['itemtype ' ] == OLA ::getType ()
516518 ) {
517- $ input ['values ' ]['show_service_level_types ' ] = $ input ['show_service_level_types ' ];
518- unset($ input ['show_service_level_types ' ]);
519+ $ input ['values ' ]['show_service_level_types ' ] = $ input ['_show_service_level_types ' ];
520+ unset($ input ['_show_service_level_types ' ]);
519521 }
520522
521523 // Params for entity restrictables itemtypes
Original file line number Diff line number Diff line change 9999 }) }}
100100 {% endif %}
101101
102+ {% if item .fields ['itemtype' ] is defined and (item .fields ['itemtype' ] == ' SLA' or item .fields ['itemtype' ] == ' OLA' ) %}
103+ {# keys are SLM:TTR, SLM::TTO #}
104+ {{ fields.dropdownArrayField (
105+ ' _show_service_level_types' ,
106+ item .fields ['_show_service_level_types' ],
107+ {
108+ 0: __(' Time to resolve' , ' formcreator' ),
109+ 1: __(' Time to own' , ' formcreator' ),
110+ },
111+ __(' Type' , ' formcreator' )
112+ ) }}
113+
114+ {{ fields.nullField ({
115+ label_class : ' col-xxl-4' ,
116+ input_class : ' col-xxl-8' ,
117+ }) }}
118+ {% endif %}
119+
120+
102121 {# _is_tree is set in the showForm method, and helps to find if the itemtype is a tree #}
103122 {% if item .fields ['_is_tree' ] == ' 1' %}
104123
You can’t perform that action at this time.
0 commit comments