Version 8 (modified by figaro, 7 years ago) (diff)

Cosmetic changes

Value Propagation Plugin


A 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.

Update values in other tickets based on ticket changes. For example, with SubticketsPlugin and TimingAndEstimationPlugin 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.

There are three types of relationships:

  • self - the "other" ticket is the current ticket (update another field)
  • link - the other tickets are listed in a field of this ticket
  • query - the other tickets can be queried based on this ticket's ID

There are several methods of updating the other ticket's value:

  • sum - add this ticket's value to the other ticket's value. (This ticket's old value is subtracted first.) Essentially:
oldOther[to] -= old_values[from]
newOther[to] += ticket[from]
  • min - the other ticket's value is the minimum of its old value and this ticket's value
  • max - the other ticket's value is the maximum of its old value and this ticket's value
  • suffix - this ticket's value is added as a suffix to the other ticket's value. (This ticket's old value is removed first.)
  • prefix - this ticket's value is added as a prefix to the other ticket's value. (This ticket's old value is removed first.)

Other desirable methods which are not yet implemented:

  • union: like sum but field f is a list (set)
  • set: other's f2 is ticket's f1.

When the enum priority changes, the pseudo-field "priority_value" is available for processing.

Configuration looks something like:

r1.type = link = parents
r1.fields = estimatedhours, hours
r1.method.estimatedhours = sum
r1.method.hours = sum

r2.type = query
r2.query = SELECT child FROM subtickets WHERE parent = %s
r2.fields = effpriority
r2.method.effpriority = prefix

r3.type = self
r3.fields = priority:effpriority
r3.method.priority = suffix

Bugs/Feature Requests

Existing bugs and feature requests for ValuePropagationPlugin are here.

If you have any issues, create a new ticket.


3 / 3


Download the zipped source from here.


You can check out ValuePropagationPlugin from here using Subversion, or browse the source with Trac.


  1. Download the source and run:
    python bdist_egg
  1. Install it in one of the following ways:
    cp dist/*.egg path/to/trac/env/plugins
    easy_install dist/*.egg
  1. Enable the plugin in your trac.ini file:
    valuepropagation.* = enabled


# Update based on a field in the ticket
r1.type = link
# Find other ticket IDs in "parents" field (from Subtickets) = parents
# Update estimatedhours and hour (from Timing and Estimation)
r1.fields = estimatedhours, hours
# Both fields roll up to parent by summing child values.
r1.method.estimatedhours = sum
r1.method.hours = sum

Recent Changes

ChangeLog macro failed
No node valuepropagationplugin at revision 5494


Author: ChrisNelson
Maintainer: Chris Nelson