Event Not Triggered

Feb 15, 2011 at 7:54 PM

I installed and configured the Aggregator according to your explanations on the Home page, but nothing is happening.

I recycled the application pool on the server and tried different uri for the connection.

Is there something logged somewhere? I don't know how to see what is happening...

By the way, your application looks awesome. I cannot wait to see it working!

Thank you very much!

Coordinator
Feb 15, 2011 at 8:06 PM
Edited Feb 15, 2011 at 8:11 PM
Hmmm. It should just work.

I last week I moved from my Dev environment to my Prod one and had a similar issue (where it just did not work). This is a check list of things to double check.
  • You are using it on a TFS 2010 server
  • You have updated the AggregatorItems.xml file to use a valid url to your server (an example of a valid url is http://YourTFS2010Server:8080/tfs)
  • You copied both the DLL and the AggregatorItems.xml file to the plugins location on the TFS Application Tier Server (Usually at: <Drive>:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins)
  • You have valid names for source and destination fields in AggregatorItems.xml.
  • When you saved the file you saved it as utf-8 encoding (in Notepad ++ it is called “utf-8 without BOM”) (This should not be an issue, but it does not hurt to check).
Also if you are having issues I recommend making a simple AggregatorItems.xml file and trying that out.

If you check all the above items and it still does not work then send me your simple AggregatorItems.xml file and the xml of the work item type you are trying to update and I will look why it does not work (the TFS Power Tools allow you to export the xml of work item types). I am ashamed to admit that I did not really put in logging. I used to debugger to work out all the issues and used console.writeline somewhat.

If you have found a bug then I would like to fix it.

 

Feb 16, 2011 at 1:13 PM

Thanks for your quick reply. See below my answers.

 

Vaccano wrote:

Hmmm. It should just work.

I last week I moved from my Dev environment to my Prod one and had a similar issue (where it just did not work). This is a check list of things to double check.
  • You are using it on a TFS 2010 server Yes
  • You have updated the AggregatorItems.xml file to use a valid url to your server (an example of a valid url is http://YourTFS2010Server:8080/tfs) I tried with and without the collection name. I think i have to put the collection at the end of the URL.
  • You copied both the DLL and the AggregatorItems.xml file to the plugins location on the TFS Application Tier Server (Usually at: <Drive>:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins) Yes and the server actually recycled (saw from event log)
  • You have valid names for source and destination fields in AggregatorItems.xml. Verified twice. I am using the name, not the refname (as noted in your explanations)
  • When you saved the file you saved it as utf-8 encoding (in Notepad ++ it is called “utf-8 without BOM”) (This should not be an issue, but it does not hurt to check). I thought that too at the beginning so I made a new file and saved in UTF-8.
Also if you are having issues I recommend making a simple AggregatorItems.xml file and trying that out.

If you check all the above items and it still does not work then send me your simple AggregatorItems.xml file and the xml of the work item type you are trying to update and I will look why it does not work (the TFS Power Tools allow you to export the xml of work item types). I am ashamed to admit that I did not really put in logging. I used to debugger to work out all the issues and used console.writeline somewhat.

If you have found a bug then I would like to fix it.

 

I already have a lot of product backlog items in my project. Correct me if I am wrong, but I think that the items are updated only when a child is created or updated (I am using the rule to update the work to do of the product backlog item based on the work to do for each task). So ultimately, all the PBIs will be updated at one point in the sprint. I will give it a try and see what's happening in long term.

Thanks again!

Coordinator
Feb 17, 2011 at 9:08 PM

>>I tried with and without the collection name. I think i have to put the collection at the end of the URL.

Mine works with out the collection.  But I just pass that into the TFS API, so maybe the collection will not affect it.

>>Correct me if I am wrong, but I think that the items are updated only when a child is created or updated

You are right.  One of my possible future enhancements it to create a way to recalculate a project's aggregations.

You should be able to update the title or something simple on a child work item and see if the aggreagation works.

Again, if it does not work, send me your aggregationItems.xml file and the xml of the workitems in question (You can export them using the Process Template tools that come with the TFS Power Tools)


Feb 18, 2011 at 1:28 PM

Thanks a lot! It works awesome! You just need to update one of the child item and it triggers the aggregation.

Good work! I cannot wait for the new features!

May 12, 2011 at 12:10 PM

Hi,

I have created a very basic "AggregatorItems.xml" and checked it via the check list above -  nothing is happen.

Can you please review below "AggregatorItems.xml" and  "Task.xml" (work item) and let me know what I'm doing wrong.

Thanks in advance,

Yariv

B.T.W - I didn't use the "Insert Code Snippet" - have trouble to insert a large xml.

 

 "AggregatorItems.xml":

<?xml version="1.0" encoding="utf-8"?><AggregatorItems tfsServerUrl="http://vm-csiltfs:8080/tfs" >  <!--Add up the estimated work on the task-->  <AggregatorItem operationType="Numeric" operation="Sum" linkType="Self" workItemType="Task">  <TargetItem name="temptarget"/>  <SourceItem name="tempsource"/>  </AggregatorItem>
</AggregatorItems>

 

"Task.xml"

<?xml version="1.0" encoding="utf-8"?><witd:WITD application="Work item type editor" version="1.0" xmlns:witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">  <WORKITEMTYPE name="Task">    <DESCRIPTION>Includes information about a particular Product Backlog Item</DESCRIPTION>    <GLOBALLISTS />    <FIELDS>      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">        <HELPTEXT>Name or short description that clearly identifies the task</HELPTEXT>        <REQUIRED />        <CANNOTLOSEVALUE />      </FIELD>      <FIELD name="State" refname="System.State" type="String" reportable="dimension">        <HELPTEXT>This is the status of the current status of the task as selected by a team member</HELPTEXT>      </FIELD>      <FIELD name="Rev" refname="System.Rev" type="Integer" reportable="dimension" />      <FIELD name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true" reportable="dimension" />      <FIELD name="History Date (Scrum v3)" refname="Scrum.v3.HistoryDate" type="DateTime" reportable="dimension">        <COPY from="clock" />        <DEFAULT from="clock" />      </FIELD>      <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension" />      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension">        <HELPTEXT>Choose the Sprint in which this task will be worked on</HELPTEXT>      </FIELD>      <FIELD name="Iteration ID" refname="System.IterationId" type="Integer" />      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">        <HELPTEXT>The team member currently assigned to act on the task</HELPTEXT>        <ALLOWEDVALUES expanditems="true" filteritems="excludegroups">          <LISTITEM value="[project]\Project Administrators" />          <LISTITEM value="[project]\Contributors" />        </ALLOWEDVALUES>      </FIELD>      <FIELD name="Work Item Type" refname="System.WorkItemType" type="String" reportable="dimension" />      <FIELD name="Work Remaining (Scrum v3)" refname="Scrum.v3.WorkRemaining" type="Double" reportable="measure" formula="sum">        <HELPTEXT>Number of hours remaining on this task or feature updated by team members on at least a daily basis</HELPTEXT>        <WHENCHANGED field="Scrum.v3.EstimatedEffort">          <REQUIRED />        </WHENCHANGED>        <SUGGESTEDVALUES expanditems="true">          <LISTITEM value="1" />          <LISTITEM value="2" />          <LISTITEM value="3" />          <LISTITEM value="5" />          <LISTITEM value="8" />          <LISTITEM value="4" />          <LISTITEM value="7" />          <LISTITEM value="6" />        </SUGGESTEDVALUES>      </FIELD>      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" reportable="dimension" />      <FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />      <FIELD name="Estimated Effort (Scrum v3)" refname="Scrum.v3.EstimatedEffort" type="Double" reportable="measure" formula="sum">        <HELPTEXT>The estimated effort needed to complete the feature in hours</HELPTEXT>        <SUGGESTEDVALUES expanditems="true">          <LISTITEM value="1" />          <LISTITEM value="2" />          <LISTITEM value="3" />          <LISTITEM value="5" />          <LISTITEM value="8" />          <LISTITEM value="4" />          <LISTITEM value="7" />          <LISTITEM value="6" />        </SUGGESTEDVALUES>      </FIELD>      <FIELD name="Task Priority (Scrum v3)" refname="Scrum.v3.TaskPriority" type="Integer" reportable="dimension">        <HELPTEXT>Order in which this task will be worked on within the Sprint</HELPTEXT>        <SUGGESTEDVALUES expanditems="true">          <LISTITEM value="1" />          <LISTITEM value="2" />          <LISTITEM value="3" />          <LISTITEM value="5" />          <LISTITEM value="8" />          <LISTITEM value="4" />          <LISTITEM value="7" />          <LISTITEM value="6" />        </SUGGESTEDVALUES>        <DEFAULT from="value" value="1" />      </FIELD>      <FIELD name="Description" refname="System.Description" type="PlainText">        <HELPTEXT>Detailed description of the task</HELPTEXT>      </FIELD>      <FIELD name="History" refname="System.History" type="History">        <HELPTEXT>Discussion thread and other historical information including fields that have changed, by whom and when.</HELPTEXT>      </FIELD>      <FIELD name="Invested" refname="W6.Inversted" type="Double" reportable="measure" formula="sum">        <HELPTEXT>Invested time</HELPTEXT>        <WHENCHANGED field="Scrum.v3.EstimatedEffort">          <DEFAULT for="[global]\Project Collection Administrators" from="value" value="0" />        </WHENCHANGED>      </FIELD>      <FIELD name="External Link Count" refname="System.ExternalLinkCount" type="Integer" />      <FIELD name="Related Link Count" refname="System.RelatedLinkCount" type="Integer" />      <FIELD name="Team Project" refname="System.TeamProject" type="String" reportable="dimension" />      <FIELD name="temptarget" refname="temp.target" type="Integer" reportable="measure" formula="sum" />      <FIELD name="tempsource" refname="temp.source" type="Integer" reportable="measure" formula="sum" />      <FIELD name="Hyperlink Count" refname="System.HyperLinkCount" type="Integer" />      <FIELD name="Attached File Count" refname="System.AttachedFileCount" type="Integer" />      <FIELD name="Node Name" refname="System.NodeName" type="String" />      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension">        <HELPTEXT>Feature Scope can be used to categorise or theme a Sprint Task and can be different to the Product Backlog Feature Path</HELPTEXT>      </FIELD>      <FIELD name="Revised Date" refname="System.RevisedDate" type="DateTime" reportable="detail" />      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" reportable="dimension" />      <FIELD name="ID" refname="System.Id" type="Integer" reportable="dimension">        <HELPTEXT>Human readable, auto-populated numeric Id</HELPTEXT>      </FIELD>      <FIELD name="Area ID" refname="System.AreaId" type="Integer" />      <FIELD name="Authorized As" refname="System.AuthorizedAs" type="String" syncnamechanges="true" />    </FIELDS>    <WORKFLOW>      <STATES>        <STATE value="Done">          <FIELDS>            <FIELD refname="Scrum.v3.WorkRemaining">              <COPY from="value" value="0" />              <ALLOWEDVALUES expanditems="true">                <LISTITEM value="0" />              </ALLOWEDVALUES>            </FIELD>          </FIELDS>        </STATE>        <STATE value="Not Started" />        <STATE value="In Progress" />        <STATE value="Deleted" />        <STATE value="Descoped" />      </STATES>      <TRANSITIONS>        <TRANSITION from="" to="Not Started">          <REASONS>            <DEFAULTREASON value="New" />          </REASONS>        </TRANSITION>        <TRANSITION from="Not Started" to="In Progress">          <REASONS>            <DEFAULTREASON value="Work has commenced" />          </REASONS>        </TRANSITION>        <TRANSITION from="Not Started" to="Descoped">          <REASONS>            <DEFAULTREASON value="Item removed from scope" />          </REASONS>        </TRANSITION>        <TRANSITION from="In Progress" to="Done">          <REASONS>            <DEFAULTREASON value="Work has been completed" />          </REASONS>        </TRANSITION>        <TRANSITION from="In Progress" to="Descoped">          <REASONS>            <DEFAULTREASON value="Item removed from scope" />          </REASONS>        </TRANSITION>        <TRANSITION from="Not Started" to="Deleted">          <REASONS>            <DEFAULTREASON value="Item marked as deleted" />          </REASONS>        </TRANSITION>        <TRANSITION from="In Progress" to="Deleted">          <REASONS>            <DEFAULTREASON value="Item marked as deleted" />          </REASONS>        </TRANSITION>        <TRANSITION from="Descoped" to="Deleted">          <REASONS>            <DEFAULTREASON value="Item marked as deleted" />          </REASONS>        </TRANSITION>        <TRANSITION from="Descoped" to="Not Started">          <REASONS>            <DEFAULTREASON value="Work included in scope." />          </REASONS>        </TRANSITION>        <TRANSITION from="Descoped" to="In Progress">          <REASONS>            <DEFAULTREASON value="Commenced work included in scope." />          </REASONS>        </TRANSITION>        <TRANSITION from="Done" to="Deleted">          <REASONS>            <DEFAULTREASON value="Item marked as deleted" />          </REASONS>        </TRANSITION>        <TRANSITION from="Deleted" to="Not Started">          <REASONS>            <DEFAULTREASON value="Deleted item restored" />          </REASONS>        </TRANSITION>        <TRANSITION from="Deleted" to="In Progress">          <REASONS>            <DEFAULTREASON value="Deleted item restored" />          </REASONS>        </TRANSITION>        <TRANSITION from="Deleted" to="Descoped">          <REASONS>            <DEFAULTREASON value="Deleted item restored" />          </REASONS>        </TRANSITION>        <TRANSITION from="Deleted" to="Done">          <REASONS>            <DEFAULTREASON value="Deleted item restored" />          </REASONS>        </TRANSITION>      </TRANSITIONS>    </WORKFLOW>    <FORM>      <Layout>        <Group>          <Column PercentWidth="100">            <Control FieldName="System.Title" Type="FieldControl" Label="Title" LabelPosition="Left" />          </Column>        </Group>        <Group>          <Column PercentWidth="33">            <Group Label="Fundamentals">              <Column PercentWidth="100">                <Control FieldName="Scrum.v3.EstimatedEffort" Type="FieldControl" Label="Estimated Effort (hours)" LabelPosition="Left" />                <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="Feature Scope" LabelPosition="Left" />              </Column>            </Group>          </Column>          <Column PercentWidth="33">            <Group Label="Scheduling">              <Column PercentWidth="100">                <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Planning Scope" LabelPosition="Left" />                <Control FieldName="Scrum.v3.TaskPriority" Type="FieldControl" Label="Task Priority" LabelPosition="Left" />              </Column>            </Group>          </Column>          <Column PercentWidth="33">            <Group Label="Tracking">              <Column PercentWidth="100">                <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Owned By" LabelPosition="Left" />                <Control FieldName="System.State" Type="FieldControl" Label="Current Status" LabelPosition="Left" />                <Control FieldName="Scrum.v3.WorkRemaining" Type="FieldControl" Label="Work Remaining (hours)" LabelPosition="Left" />                <Control FieldName="W6.Inversted" Type="FieldControl" Label="Invested (hours)" LabelPosition="Left" />                <Control FieldName="temp.target" Type="FieldControl" Label="target" LabelPosition="Left" />                <Control FieldName="temp.source" Type="FieldControl" Label="source" LabelPosition="Left" />              </Column>            </Group>          </Column>        </Group>        <TabGroup>          <Tab Label="Description and History">            <Group>              <Column PercentWidth="100">                <Control FieldName="System.Description" Type="HtmlFieldControl" Label="Description:" LabelPosition="Top" Dock="Top" MinimumSize="(100,100)" />                <Control FieldName="System.History" Type="WorkItemLogControl" Label="History:" LabelPosition="Top" Dock="Fill" />              </Column>            </Group>          </Tab>          <Tab Label="Implements">            <Control Type="LinksControl" Label="The implemented Backlog Item:" LabelPosition="Top" Name="BacklogItemLink">              <LinksControlOptions>                <LinkColumns>                  <LinkColumn RefName="System.ID" />                  <LinkColumn RefName="System.Links.LinkType" />                  <LinkColumn RefName="System.WorkItemType" />                  <LinkColumn RefName="System.Title" />                  <LinkColumn RefName="System.State" />                  <LinkColumn LinkAttribute="System.Links.Comment" />                </LinkColumns>                <WorkItemLinkFilters FilterType="include">                  <Filter LinkType="Scrum.ImplementedBy" FilterOn="reversename" />                </WorkItemLinkFilters>                <ExternalLinkFilters FilterType="excludeAll" />                <WorkItemTypeFilters FilterType="include">                  <Filter WorkItemType="Product Backlog Item" />                </WorkItemTypeFilters>              </LinksControlOptions>            </Control>          </Tab>          <Tab Label="All Links">            <Control Type="LinksControl" LabelPosition="Top" Name="OtherLinks">              <LinksControlOptions>                <LinkColumns>                  <LinkColumn RefName="System.ID" />                  <LinkColumn RefName="System.Links.LinkType" />                  <LinkColumn RefName="System.WorkItemType" />                  <LinkColumn RefName="System.Title" />                  <LinkColumn RefName="System.AssignedTo" />                  <LinkColumn RefName="System.State" />                  <LinkColumn LinkAttribute="System.Links.Comment" />                </LinkColumns>                <WorkItemLinkFilters FilterType="includeAll" />                <ExternalLinkFilters FilterType="includeAll" />                <WorkItemTypeFilters FilterType="includeAll" />              </LinksControlOptions>            </Control>          </Tab>          <Tab Label="File Attachments">            <Control Type="AttachmentsControl" LabelPosition="Top" />          </Tab>          <Tab Label="Process Guidance">            <Control Type="WebpageControl" LabelPosition="Top" Dock="Fill">              <WebpageControlOptions AllowScript="false" ReloadOnParamChange="false">                <Link UrlRoot="http://www.scrumforteamsystem.com" UrlPath="processguidance/v3/{0}/{1}">                  <Param Index="0" Value="System.WorkItemType" Type="Current" />                  <Param Index="1" Value="System.State" Type="Current" />                </Link>              </WebpageControlOptions>            </Control>          </Tab>        </TabGroup>      </Layout>    </FORM>  </WORKITEMTYPE></witd:WITD>

May 25, 2011 at 7:28 PM

Hi, 

One thing that helps me find the error message, was enabling the trace messages in web.config (in the source code has a 'Trace.Write' inside a try/catch in the ProcessEvent method). Edit C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\web.config file, in appSettings element, enable the tracewriter key to 'true' and the 'traceDirectoryName' to a specific folder. Try to change the work item again. This should log the reason why TFSAggregator isn't working. In my case I got this error message: 

TF26198: The work item does not exist, or you do not have permission to access it

Now I trying to figure out why this error is happening.

I hope this helps you,

Carlos.

May 26, 2011 at 2:10 PM

That error occurs when edits get done to a client that does not have the current revision.  Usually it means you need to do a refresh.

I am not sure sure why it is happening in your case...

Jun 22, 2011 at 8:21 PM

Finally working !!

Well, after getting this message (TF26198: The work item does not exist, or you do not have permission to access it), I tried two things:

1 - Put the TFS service account in all administrators group in the remote TFS server. Still not working, permission problem discarded.

2 - Installed the TFS in my machine. Worked (only on my machine !!!)

Well, after comparing the two TFS installations, I realized that the remote server (the production TFS that isn't working with TFS Aggregator) starts to working when I used the tfsServerUrl attribute in AggregatorItems.xml as the TFS PROJECT COLLECTION URI. In my local machine, it was working with the TFS Uri (without the collection). I don't know why. I discovered that after look into the code, and compare the method to access the TFS with one that I have in an custom activity in my build. I still don't know why the local requires the TFS Uri and the remote requires the TFS Uri collection. 

Actually, in the remote server, it didn't start to working, it just stopped to log the initial error. After some investigation, I noticed that the field involved in the aggregation has to be DOUBLE (one of them was INTEGER). Now, it's ok.

Jun 23, 2011 at 11:33 AM

Hi Carlosgsantos,

Thank you very much for you reply.

I will check it and let you know the status.

Thanks again,

Yariv

From: carlosgsantos [email removed]
Sent: Wednesday, June 22, 2011 11:22 PM
To: Yariv Finkelshtein
Subject: Re: Event Not Triggered [TFSAggregator:246170]

From: carlosgsantos

Finally working !!

Well, after getting this message (TF26198: The work item does not exist, or you do not have permission to access it), I tried two things:

1 - Put the TFS service account in all administrators group in the remote TFS server. Still not working, permission problem discarded.

2 - Installed the TFS in my machine. Worked (only on my machine !!!)

Well, after comparing the two TFS installations, I realized that the remote server (the production TFS that isn't working with TFS Aggregator) starts to working when I used the tfsServerUrl attribute in AggregatorItems.xml as the TFS PROJECT COLLECTION URI. In my local machine, it was working with the TFS Uri (without the collection). I don't know why. I discovered that after look into the code, and compare the method to access the TFS with one that I have in an custom activity in my build. I still don't know why the local requires the TFS Uri and the remote requires the TFS Uri collection.

Actually, in the remote server, it didn't start to working, it just stopped to log the initial error. After some investigation, I noticed that the field involved in the aggregation has to be DOUBLE (one of them was INTEGER). Now, it's ok.



CONFIDENTIALITY NOTICE: This email may contain ClickSoftware confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you have received this communication in error, please notify the sender immediately by email and delete the message and any file attachments from your computer. Thank you.
Coordinator
Jun 28, 2011 at 5:16 PM

Sorry for not replying to this thread for a while.  If you still have issues please repost them and I will try to help.

Jul 6, 2011 at 8:44 AM

Hi Vaccano,

What’s up? Hoping everything is wonderful J.

I’m bumping into an aggregation issue which is not clarified to me L

I was hoping you to glance at the attached file (which contains the following: several WITs, AggregatorItems.xml and Event log file) and see in a min what is wrong.

I will greet it.

Thanks,

Yariv

From: vaccano [email removed]
Sent: Tuesday, June 28, 2011 8:16 PM
To: Yariv Finkelshtein
Subject: Re: Event Not Triggered [TFSAggregator:246170]

From: vaccano

Sorry for not replying to this thread for a while. If you still have issues please repost them and I will try to help.



CONFIDENTIALITY NOTICE: This email may contain ClickSoftware confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you have received this communication in error, please notify the sender immediately by email and delete the message and any file attachments from your computer. Thank you.
Coordinator
Jul 7, 2011 at 6:20 PM

I looked at the config you have and it looks ok.

The only thing I can suggest is that normal usage has at least 2 SourceItem fields.  That should not matter, but it may be why nothing is happening.