none
Validate IterationPath

    Question

  • Dear,

    I'm customizing the process template for TFS add validation in IterationPath of work items. We have several project collections of various projects in each collection. Searching the internet, I found references to http://blogs.msdn.com/b/jongallant/archive/2011/07/25/how-to-validate-area-amp-iteration-paths-in-tfs.aspx  but I can not apply in my business.

    By having several collections of projects, IterationID number 5 in a collection that should be blocked, it can be in another.

    The field type IterationPath is TreePath. You can get the text of the selected value in the field? Is there any function that validate that the text we find some special characters (like "\")?

    Thank you,

    Rodrigo Pires Duarte | OnClick Sistemas
    Monday, April 09, 2012 6:27 PM

Answers

  • The rule set available to use in work items is very limited. Also, some fields (like area and iteration path) are further limited in which rules can be applied to them.

    I think your best option would be to build a custom control that can perform a more advanced validation of the area and iteration path. The control should be able to set the value on a hidden field to something like pass/fail and you can then use the standard work item ruleset to require the value to be pass. This is just a quick idea, you might need to refine it some...


    Jesper Fernström
    QWise Software engineering – refactored!

    Thursday, April 12, 2012 5:37 AM

All replies

  • Take a look at the "Iteration Closed Down" scenario in the Rangers guidance: http://vsartfsptguide.codeplex.com/releases/view/83765

    Please remember to mark the replies as answers if they help.

    Tuesday, April 10, 2012 2:56 PM
  • Thanks for the reply Ewald, but had already consulted the guidance and he refers to the same article mentioned in the post. In the current scenario, we have the same process template for all collections of projects. Projects in different collections have the same Iteration ID for a project that should be blocked but not to another.

    The ideal would be to treat the text of the Iteration Path. Example: if the text of the Iteration Path does not have any character level ("\"), then the iteration path is invalid because the first level should not be used.

    Thank you,

    Rodrigo Pires Duarte | OnClick Sistemas

    Tuesday, April 10, 2012 5:29 PM
  • The rule set available to use in work items is very limited. Also, some fields (like area and iteration path) are further limited in which rules can be applied to them.

    I think your best option would be to build a custom control that can perform a more advanced validation of the area and iteration path. The control should be able to set the value on a hidden field to something like pass/fail and you can then use the standard work item ruleset to require the value to be pass. This is just a quick idea, you might need to refine it some...


    Jesper Fernström
    QWise Software engineering – refactored!

    Thursday, April 12, 2012 5:37 AM
  • Hi Rodrigo,

    How about the issue now?

    Relate issue for you to refer:
    http://social.msdn.microsoft.com/Forums/en/tfsworkitemtracking/thread/874610c3-23bc-43d4-a3bc-a57350867f8c
    http://social.msdn.microsoft.com/Forums/en-US/tfsworkitemtracking/thread/565af9fc-29a4-4476-a6a3-6fd348ddd30e

    If anything is unclear, please free feel to let me know.

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, April 12, 2012 7:18 AM
  • Jesper, thanks for the reply.

    Through a custom control be able to treat the text of IterationPath, for example?

    Rodrigo Pires Duarte | OnClick Sistemas


    Thursday, April 12, 2012 12:21 PM
  • Lily_Wu, thanks for the reply.

    There was consulted these posts, but all refer to IterationId, which can not be used. We have the following structure:

    DelphiColletion
       +--- Project 1          (Id 1)
              +--- Iteration 1 (Id 2)
              +--- Iteration 2 (Id 3)
              +--- Iteration 3 (Id 4)
              +--- Iteration 4 (Id 5)
       +--- Project 2          (Id 6)
              +--- Iteration 1 (Id 7)
       +--- Project 3          (Id 8)
              +--- Iteration 1 (Id 9)
              +--- Iteration 2 (Id 10)
              +--- Iteration 3 (Id 11)
              +--- Iteration 4 (Id 12)
              +--- Iteration 5 (Id 13)
              +--- Iteration 6 (Id 14)
              +--- Iteration 7 (Id 15)

    NetColletion
       +--- Project 1          (Id 1)
              +--- Iteration 1 (Id 2)
       +--- Project 2          (Id 3)
              +--- Iteration 1 (Id 4)
              +--- Iteration 2 (Id 5)
              +--- Iteration 3 (Id 6)
              +--- Iteration 4 (Id 7)
              +--- Iteration 5 (Id 8)
              +--- Iteration 6 (Id 9)
              +--- Iteration 7 (Id 10)
       +--- Project 3          (Id 11)
              +--- Iteration 1 (Id 12)
              +--- Iteration 2 (Id 13)
              +--- Iteration 3 (Id 14)
              +--- Iteration 4 (Id 15)

    For the proposed solutions, adding treatment to block the use of ID 6 DelphiCollection work for the collection but will not work for NetCollection. The Id 6 for NetCollection (Project2 \ Iteration 3) can be used by team.

    Rodrigo Pires Duarte | OnClick Sistemas

    Thursday, April 12, 2012 12:35 PM
  • Hi Rodrigo,

    Thank you for your question.

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thank you for your understanding and support.

    Best regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, April 13, 2012 7:51 AM
  • Rodrigo,

    I am sorry but I am still confused what you are trying to achieve here. Could you try again to give a more thorough description of what you are trying to achieve? Are you trying to prohibit certain Iteration ID value from being entered by user in one collection only but not the other collections?


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    Thursday, April 19, 2012 3:40 PM
  • Do you still need help with this?

    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    Tuesday, April 24, 2012 7:51 PM
  • Dear,

    Until yesterday I needed help with this thread, but I managed to solve the business need a little more investigating what Jesper Fernstrom commented on "Custom Controls".

    Through the custom control could access the text representing the Iteration Path. Thus it was possible to validate the use of "root" option. I took the same control by adding other rules that also could not deal only through the workflow.

    Thread closed!

    Thank you,

    Rodrigo Pires Duarte | OnClick Sistemas

    Tuesday, April 24, 2012 8:33 PM