Changes between Version 1 and Version 2 of KeepInterfaceSimplePlugin
- Timestamp:
- Dec 1, 2015, 8:28:42 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
KeepInterfaceSimplePlugin
v1 v2 5 5 == Description 6 6 7 This plugin helps support complex workflows that contain lots of fields or have lots of rules about what is and isn't permitted. It can dynamically control what fields appear in the user interface depending on quitecomplex conditions that are nonetheless easy to define and configure. It can also block commits if necessary, such as when certain information hasn't been provided.7 This plugin supports complex workflows that contain lots of fields or have lots of rules about what is and isn't permitted. It can dynamically control what fields appear in the user interface depending on complex conditions that are nonetheless easy to define and configure. It can also block commits if necessary, such as when certain information hasn't been provided. 8 8 9 9 There are two main components, named 'assistant' and 'warden'. 10 10 11 11 The Assistant uses expressions to define what fields are presented to the user in different circumstances. For example, take the rules: 12 {{{ 12 {{{#!ini 13 13 [kis_assistant] 14 14 approval.visible = !status in 'new', 'closed' … … 18 18 approval.available.full_set = authname has_role 'approver' || _approval == 'Approved' 19 19 }}} 20 20 21 This requires that a custom field named 'approval' is defined (either a Select or a Radio field) with options 'Not assessed', 'Denied' and 'Approved'. The first rule states that the field only appears when the ticket status is other than 'new' or 'closed'. The basic set of options 'Not assessed' or 'Denied' are always available, but the full set of options including 'Approved' is only available if the user is a member of the 'approver' group or if the field already had the value 'Approved' when the page was loaded. 21 22 22 23 The Warden prevents commits from being made if certain conditions aren't met. For example, take the rules: 23 {{{ 24 {{{#!ini 24 25 [kis_warden] 25 26 approval required to close = status == 'closed' && approval != 'Approved' 26 27 only designated approver can approve = !authname has_role 'approver' && approval != _approval && approval == 'Approved' 27 28 }}} 29 28 30 The first rule means that the ticket cannot be closed if the 'approval' field has not been set to the value 'Approved'. The second rule means that only a user who is a member of the group 'approver' can change the 'approval' field to that value. 29 30 31 31 32 == !Bugs/Feature Requests … … 45 46 == Source 46 47 47 You can check out KeepInterfaceSimplePlugin from [ http://trac-hacks.org/svn/keepinterfacesimpleplugin here] using Subversion, or [source:keepinterfacesimpleplugin browse the source] with Trac.48 You can check out KeepInterfaceSimplePlugin from [/svn/keepinterfacesimpleplugin here] using Subversion, or [source:keepinterfacesimpleplugin browse the source] with Trac. 48 49 49 50 == Installation