Changes between Initial Version and Version 1 of KeepInterfaceSimplePlugin


Ignore:
Timestamp:
Nov 28, 2015, 1:32:07 PM (8 years ago)
Author:
Jon Ashley
Comment:

New hack KeepInterfaceSimplePlugin, created by ash

Legend:

Unmodified
Added
Removed
Modified
  • KeepInterfaceSimplePlugin

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
     3= Dynamically show and hide fields and options, and enforce user-defined rules on commits.
     4
     5== Description
     6
     7This 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 quite 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
     9There are two main components, named 'assistant' and 'warden'.
     10
     11The Assistant uses expressions to define what fields are presented to the user in different circumstances. For example, take the rules:
     12{{{
     13[kis_assistant]
     14approval.visible = !status in 'new', 'closed'
     15approval.options.basic_set = Not assessed, Denied
     16approval.available.basic_set = true
     17approval.options.full_set = Approved
     18approval.available.full_set = authname has_role 'approver' || _approval == 'Approved'
     19}}}
     20This 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
     22The Warden prevents commits from being made if certain conditions aren't met. For example, take the rules:
     23{{{
     24[kis_warden]
     25approval required to close = status == 'closed' && approval != 'Approved'
     26only designated approver can approve = !authname has_role 'approver' && approval != _approval && approval == 'Approved'
     27}}}
     28The 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== !Bugs/Feature Requests
     32
     33Existing bugs and feature requests for KeepInterfaceSimplePlugin are
     34[report:9?COMPONENT=KeepInterfaceSimplePlugin here].
     35
     36If you have any issues, create a
     37[/newticket?component=KeepInterfaceSimplePlugin new ticket].
     38
     39[[TicketQuery(component=KeepInterfaceSimplePlugin&group=type,format=progress)]]
     40
     41== Download
     42
     43Download the zipped source from [export:keepinterfacesimpleplugin here].
     44
     45== Source
     46
     47You can check out KeepInterfaceSimplePlugin from [http://trac-hacks.org/svn/keepinterfacesimpleplugin here] using Subversion, or [source:keepinterfacesimpleplugin browse the source] with Trac.
     48
     49== Installation
     50
     51General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
     52
     53== Recent Changes
     54
     55[[ChangeLog(keepinterfacesimpleplugin, 3)]]
     56
     57== !Author/Contributors
     58
     59**Author:** [wiki:ash] [[BR]]
     60**Maintainer:** [[Maintainer]] [[BR]]
     61**Contributors:**