Search code examples
azure-devopstfs-workitem

Is there a way to perform calculations using fields in a custom inherited process?


I am creating a custom Agile based process and want to automate priority using the formula Value / Effort and I wish to store the value of this calculation in a new field called something like "Auto Priority". Is this possible?

So my backlog ordered by Auto Priority would end up something like this:

+-------+--------+---------------+
| Value | Effort | Auto Priority |
+-------+--------+---------------+
| 5     | 1      | 5             |
| 8     | 3      | 2.6           |
| 3     | 3      | 1             |
| 1     | 5      | 0.2           |
+-------+--------+---------------+

I have tried making a custom rule for this but there doesn't seem to be an action for making any basic calculations. Only other option I can see is to create my own custom control.


Solution

  • Is this possible?

    Of course yes. And I'm afraid, the best choice for you would be adding a custom control.

    1) For VSTS, there has another option: Microsoft Flow. But what the issue is, you are using TFS rather than VSTS, so this does not work for you because Microsoft Flow does not has connector with TFS until now.

    2) Another one is do work item numeric calculation with Excel.

    In Excel, you can get work items fields value, do excel calculation and save it back to TFS. You can connect the calculated fields in Excel with the fields in TFS work item.

    If you don't want to make use of custom control, this would the easiest way that you can think of.

    Note: This method need you use Excel as TFS client during changes of work item fields, which will also have impact on calculated field.

    3) There has one plugin which can enable running custom script when Work Items change, also include allowing dynamic calculation of field values in TFS.

    You can consider based on your actual scenario.