1

I have a need to multiply two fields in a request. So I put the code below into AggregationItems.xml

<AggregatorItem name="score_mult" operationType="Numeric" 
                operation="Sum" linkType="Self" workItemType="Request">
    <TargetItem name="Score"/>
    <SourceItem name="DEV Score"/>
    <SourceItem name="Customer Score"/>
</AggregatorItem>

And it does not work at all. Application log in event viewer shows nothing too. Is here something wrong in the code?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Sorry. Operation is multiplyuing. Copied wrong version. Anyway sum does not work too. – Alexey Soloviev Aug 07 '15 at 16:02
  • It's worth mentioning this is a open source server side plugin: https://github.com/Vaccano/TFS-Aggregator. – Pero P. Aug 07 '15 at 16:53
  • It's going to be really difficult to work out what is wrong here without more context. Have you tried increasing the logging verbosity? It looks like you can do this as follows `` – Pero P. Aug 07 '15 at 17:01
  • Loging is in diagnosting till my first use of TFSAggregator. account have an administration rights in this project. If i will not found a solution at monday - i will debug it :) – Alexey Soloviev Aug 07 '15 at 17:17
  • @AlexeySoloviev, Your account or the one running the TFS server? – jessehouwing Aug 07 '15 at 18:02

2 Answers2

1

The "old" aggregator has quite a lot of issues. And it's probably better to try the newer version that's in development, even though we haven't released a final version yet, it has had fixes for a lot of issues in the old aggregator.

Issues that may cause this behavior:

  • Your operation currently says operation="Sum" instead of "Multiply", if multiplication is what you want, that needs to change
  • Multiply works only if all data types are the same in the old version of the aggregator. So make sure all fields are double in the TFS process configuration.
  • The version of the TFS aggregator you're using does not support integer fields. There is a branch with the old solution, but a number of fixes which has support for integer calculations. See below.
  • Referencing fields by their displaynames is a lot more fragile than using their reference names. So instead of DEV Score you could use YourCompany.Custom.DevScore instead.
  • The TFS Service Account probably (if correctly configured) does not have permission to edit the work items in the Project Collection. Add it to the Contributors group if needed.
  • The TFS Service Account is not running as administrator if configured correctly, so you need to create an Event Source for it in order for the Eventlog messaging to work. See below.
  • If you have more than one Project collection DO NOT USE THE OLD TFS AGGREGATOR, it tries to apply work item changes in one collection to work items in the one you have configured. This can lead to incorrect data in other work items.
  • There are multiple issues with empty fields and the handling of 0 in values when using the Divide and Multiply rules. This may cause division by 1 when you do not expect it.

These issues have been resolved in the latest development version of the TFS Aggregator 2.0. There are still some issues with the last beta we released, so I suggest to download the latest build from the development branch. You can find that here:

There is an old branch that contains numerous fixes to the above issues in the "old style plugin" which we abandoned in favor of a new system. If you want, you can clone this exact version and build that to solve a lot of your issues, it works on Integer fields for one.

To help debugging, either attach a Visual Studio debugger to the IIS server hosting your TFS (I suggest to do this on an instance running on your local machine for testing). To allow TFS to log events to the eventlog, make sure that the "Application" source has been created, your TFS service is not running as administrator and can't create that source by itself. From a powershell console running elevated:

New-EventLog -LogName "Application" -Source "TFSAggregator"
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Thank you! I've noticed that all of my fields are integer but not double. Unfortunately i will able to check it only at the day after tomorrow. If it will be a solution i will comment here. – Alexey Soloviev Aug 07 '15 at 17:52
  • The "old" aggregator only works on double. The "old branch" supports Integers. The New aggregator supports mixing doubles and Integers. – jessehouwing Aug 07 '15 at 18:03
  • 1
    Yes. It was a problem with types. Old tfs aggregator: https://github.com/Vaccano/TFS-Aggregator/releases/tag/1.2RC can multiply onle double fields. In the nearest future we will use new version of tfsaggregator wich @jessehouwing recommended us in above comment. Thank you very much! – Alexey Soloviev Aug 10 '15 at 07:12
  • If this answered your question, please mark it as answer. – jessehouwing Sep 08 '15 at 14:17
0

TFSAggregator https://github.com/Vaccano/TFS-Aggregator/releases/tag/1.2RC Can multiply only double fields. I changed type of fields to double and it works fine now. In the nearest future i thenk we will use new version of tfs aggregator.