[[PageOutline(2-5,Contents,pullout)]] = Dynamically show and hide fields and options, and enforce user-defined rules on commits. == Description 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. There are two main components, named 'assistant' and 'warden'. The Assistant uses expressions to define what fields are presented to the user in different circumstances. For example, take the rules: {{{#!ini [kis_assistant] approval.visible = !status in 'new', 'closed' approval.options.basic_set = Not assessed, Denied approval.available.basic_set = true approval.options.full_set = Approved approval.available.full_set = authname has_role 'approver' || _approval == 'Approved' }}} 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. The Warden prevents commits from being made if certain conditions aren't met. For example, take the rules: {{{#!ini [kis_warden] approval required to close = status == 'closed' && approval != 'Approved' only designated approver can approve = !authname has_role 'approver' && approval != _approval && approval == 'Approved' }}} 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. == !Bugs/Feature Requests Existing bugs and feature requests for KeepInterfaceSimplePlugin are [report:9?COMPONENT=KeepInterfaceSimplePlugin here]. If you have any issues, create a [/newticket?component=KeepInterfaceSimplePlugin new ticket]. [[TicketQuery(component=KeepInterfaceSimplePlugin&group=type,format=progress)]] == Download Download the zipped source from [export:keepinterfacesimpleplugin here]. == Source You can check out KeepInterfaceSimplePlugin from [/svn/keepinterfacesimpleplugin here] using Subversion, or [source:keepinterfacesimpleplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Recent Changes [[ChangeLog(keepinterfacesimpleplugin, 3)]] == !Author/Contributors **Author:** [wiki:ash] [[BR]] **Maintainer:** [[Maintainer]] [[BR]] **Contributors:**