Changes between Version 13 and Version 14 of KeepInterfaceSimplePlugin


Ignore:
Timestamp:
Jan 10, 2019, 10:17:02 PM (5 years ago)
Author:
Jon Ashley
Comment:

Make the use of empty string to represent 'status' at ticket creation more prominent in the documentation

Legend:

Unmodified
Added
Removed
Modified
  • KeepInterfaceSimplePlugin

    v13 v14  
    1313The 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.
    1414
    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')
     15For 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]
     18approval.visible = !(status == '' || status == 'closed')
    1919}}}
    2020The expression syntax is similar to that of C or Javascript. An acceptable alternative would be:
    2121{{{#!ini
    2222[kis_assistant]
    23 approval.visible = status != 'new' && status != 'closed'
     23approval.visible = status != '' && status != 'closed'
    2424}}}
    2525Because 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:
    2626{{{#!ini
    2727[kis_assistant]
    28 approval.visible = !status in 'new', 'closed'
     28approval.visible = !status in '', 'closed'
    2929}}}
    3030