Changes between Version 13 and Version 14 of KeepInterfaceSimplePlugin
- Timestamp:
- Jan 10, 2019, 10:17:02 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
KeepInterfaceSimplePlugin
v13 v14 13 13 The Assistant uses expressions to define what fields are presented to the user in different circumstances. Rule names start with the name of the field, followed by a dot, followed by the attribute "visible". If the rule evaluates to false, the field is hidden. The rule is re-evaluated whenever one of the fields affecting the result changes. 14 14 15 For example, let's assume that the tickets contain a field named 'approval' that is to be hidden if the ticket is in the 'new' or'closed' state. Write a `kis_assistant` rule for `approval.visible`:16 {{{#!ini 17 [kis_assistant] 18 approval.visible = !(status == ' new' || status == 'closed')15 For example, let's assume that the tickets contain a field named 'approval' that is to be hidden if the ticket is being created or if it is in the 'closed' state. Write a `kis_assistant` rule for `approval.visible`: 16 {{{#!ini 17 [kis_assistant] 18 approval.visible = !(status == '' || status == 'closed') 19 19 }}} 20 20 The expression syntax is similar to that of C or Javascript. An acceptable alternative would be: 21 21 {{{#!ini 22 22 [kis_assistant] 23 approval.visible = status != ' new' && status != 'closed'23 approval.visible = status != '' && status != 'closed' 24 24 }}} 25 25 Because lists of states are common, the Assistant also provides an `in` operator that tests membership of a list, with very high precedence. So another acceptable alternative would be: 26 26 {{{#!ini 27 27 [kis_assistant] 28 approval.visible = !status in ' new', 'closed'28 approval.visible = !status in '', 'closed' 29 29 }}} 30 30