Changes between Version 1 and Version 2 of ValuePropagationPlugin


Ignore:
Timestamp:
Nov 1, 2010 8:15:35 PM (4 years ago)
Author:
ChrisNelson
Comment:

Extended notes

Legend:

Unmodified
Added
Removed
Modified
  • ValuePropagationPlugin

    v1 v2  
    55== Description == 
    66 
    7 A configurable ticket change listener plugin that can update other fields or fields on other tickets when a ticket changes. 
     7A configurable ticket change listener plugin that can update other fields or fields on other tickets when a ticket changes.  This is a fairly rough first draft.  It handles ticket changes fairly well, doesn't blow up on ticket creation and doesn't do anything on ticket deletion. Looking for feedback. 
     8 
     9Update values in other tickets based on ticket changes.  For example, with Subtickets plugin and Timing and Estimation plugin in place, a parent ticket's estimate may be the sum of its children's estimates. This plugin can update the parent when the child changes. 
     10 
     11There are three types of relationships: 
     12 
     13 * self - the "other" ticket is the current ticket (update another field) 
     14 * link - the other tickets are listed in a field of this ticket 
     15 * query - the other tickets can be queried based on this ticket's ID 
     16 
     17There are several methods of updating the other ticket's value: 
     18 
     19 * sum - add this ticket's value to the other ticket's value.  (This ticket's old value is subtracted first.)  Essentially: 
     20 
     21{{{ 
     22oldOther[to] -= old_values[from] 
     23newOther[to] += ticket[from] 
     24}}} 
     25 
     26 * min - the other ticket's value is the minimum of it's old value and this ticket's value 
     27 * max - the other ticket's value is the maximum of it's old value and this ticket's value 
     28 * suffix - this ticket's value is added as a suffix to the other ticket's value.  (This ticket's old value is removed first.) 
     29 * prefix - this ticket's value is added as a prefix to the other ticket's value. (This ticket's old value is removed first.) 
     30 
     31Other desirable methods which are not yet implemented: 
     32 
     33 * union: like sum but field f is a list (set) 
     34 * set:  other's f2 is ticket's f1. 
     35 
     36FIXME - A system of pluggable types and methods would be nice. 
     37 
     38 
     39When the enum priority changes, the pseudo-field "priority_value" is available for processing. 
     40 
     41Configuration looks something like: 
     42 
     43{{{ 
     44[value_propagation] 
     45r1.type = link 
     46r1.link = parents 
     47r1.fields = estimatedhours, hours 
     48r1.method.estimatedhours = sum 
     49r1.method.hours = sum 
     50 
     51r2.type = query 
     52r2.query = SELECT child FROM subtickets WHERE parent = %s 
     53r2.fields = effpriority 
     54r2.method.effpriority = prefix 
     55 
     56r3.type = self 
     57r3.fields = priority:effpriority 
     58r2.method.priority = suffix 
     59}}} 
    860 
    961== Bugs/Feature Requests ==