Create a workItem after build fails with @Current on IterationPath












2















I'm trying to trigger a workItem Creation after build failure.
I wanted to create a workItem under the using the macro @currentIteration but sounds like I don't know the correct syntax.



I can see on my build summary the error:




Failed to create work item for build failure: TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.




So far I've used:



System.IterationPath = @currentIteration



System.IterationPath = @CurrentIteration('[projectName]TeamName')



System.IterationPath = [projectName]TeamName@CurrentIteration



And none of those worked.
Documentation is also not clear.
Can someone help?










share|improve this question







New contributor




Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    I'm trying to trigger a workItem Creation after build failure.
    I wanted to create a workItem under the using the macro @currentIteration but sounds like I don't know the correct syntax.



    I can see on my build summary the error:




    Failed to create work item for build failure: TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.




    So far I've used:



    System.IterationPath = @currentIteration



    System.IterationPath = @CurrentIteration('[projectName]TeamName')



    System.IterationPath = [projectName]TeamName@CurrentIteration



    And none of those worked.
    Documentation is also not clear.
    Can someone help?










    share|improve this question







    New contributor




    Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      2












      2








      2








      I'm trying to trigger a workItem Creation after build failure.
      I wanted to create a workItem under the using the macro @currentIteration but sounds like I don't know the correct syntax.



      I can see on my build summary the error:




      Failed to create work item for build failure: TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.




      So far I've used:



      System.IterationPath = @currentIteration



      System.IterationPath = @CurrentIteration('[projectName]TeamName')



      System.IterationPath = [projectName]TeamName@CurrentIteration



      And none of those worked.
      Documentation is also not clear.
      Can someone help?










      share|improve this question







      New contributor




      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm trying to trigger a workItem Creation after build failure.
      I wanted to create a workItem under the using the macro @currentIteration but sounds like I don't know the correct syntax.



      I can see on my build summary the error:




      Failed to create work item for build failure: TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.




      So far I've used:



      System.IterationPath = @currentIteration



      System.IterationPath = @CurrentIteration('[projectName]TeamName')



      System.IterationPath = [projectName]TeamName@CurrentIteration



      And none of those worked.
      Documentation is also not clear.
      Can someone help?







      azure-devops






      share|improve this question







      New contributor




      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Jan 18 at 16:16









      Leandro SantosLeandro Santos

      132




      132




      New contributor




      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Leandro Santos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          1 Answer
          1






          active

          oldest

          votes


















          0















          Create a workItem after build fails with @Current on IterationPath




          I am afraid you could not use the @CurrentIteration macro in the Build Pipeline with azure devops. That because this macro is supported for Azure Boards and TFS 2015 and later versions.



          You can get the detailed info from the official document Query by date or current iteration:




          Note



          Feature availability: The @CurrentIteration macro is supported for
          Azure Boards and TFS 2015 and later versions. The @CurrentIteration
          +/- n macro is supported for Azure Boards and Azure DevOps Server 2019 and later versions. These macros only work when run them from the web
          portal.




          Hope this helps.






          share|improve this answer
























          • Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

            – Leandro Santos
            2 hours ago













          • @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

            – Leo Liu-MSFT
            1 hour ago











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Leandro Santos is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54257736%2fcreate-a-workitem-after-build-fails-with-current-on-iterationpath%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0















          Create a workItem after build fails with @Current on IterationPath




          I am afraid you could not use the @CurrentIteration macro in the Build Pipeline with azure devops. That because this macro is supported for Azure Boards and TFS 2015 and later versions.



          You can get the detailed info from the official document Query by date or current iteration:




          Note



          Feature availability: The @CurrentIteration macro is supported for
          Azure Boards and TFS 2015 and later versions. The @CurrentIteration
          +/- n macro is supported for Azure Boards and Azure DevOps Server 2019 and later versions. These macros only work when run them from the web
          portal.




          Hope this helps.






          share|improve this answer
























          • Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

            – Leandro Santos
            2 hours ago













          • @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

            – Leo Liu-MSFT
            1 hour ago
















          0















          Create a workItem after build fails with @Current on IterationPath




          I am afraid you could not use the @CurrentIteration macro in the Build Pipeline with azure devops. That because this macro is supported for Azure Boards and TFS 2015 and later versions.



          You can get the detailed info from the official document Query by date or current iteration:




          Note



          Feature availability: The @CurrentIteration macro is supported for
          Azure Boards and TFS 2015 and later versions. The @CurrentIteration
          +/- n macro is supported for Azure Boards and Azure DevOps Server 2019 and later versions. These macros only work when run them from the web
          portal.




          Hope this helps.






          share|improve this answer
























          • Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

            – Leandro Santos
            2 hours ago













          • @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

            – Leo Liu-MSFT
            1 hour ago














          0












          0








          0








          Create a workItem after build fails with @Current on IterationPath




          I am afraid you could not use the @CurrentIteration macro in the Build Pipeline with azure devops. That because this macro is supported for Azure Boards and TFS 2015 and later versions.



          You can get the detailed info from the official document Query by date or current iteration:




          Note



          Feature availability: The @CurrentIteration macro is supported for
          Azure Boards and TFS 2015 and later versions. The @CurrentIteration
          +/- n macro is supported for Azure Boards and Azure DevOps Server 2019 and later versions. These macros only work when run them from the web
          portal.




          Hope this helps.






          share|improve this answer














          Create a workItem after build fails with @Current on IterationPath




          I am afraid you could not use the @CurrentIteration macro in the Build Pipeline with azure devops. That because this macro is supported for Azure Boards and TFS 2015 and later versions.



          You can get the detailed info from the official document Query by date or current iteration:




          Note



          Feature availability: The @CurrentIteration macro is supported for
          Azure Boards and TFS 2015 and later versions. The @CurrentIteration
          +/- n macro is supported for Azure Boards and Azure DevOps Server 2019 and later versions. These macros only work when run them from the web
          portal.




          Hope this helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          Leo Liu-MSFTLeo Liu-MSFT

          18.5k22132




          18.5k22132













          • Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

            – Leandro Santos
            2 hours ago













          • @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

            – Leo Liu-MSFT
            1 hour ago



















          • Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

            – Leandro Santos
            2 hours ago













          • @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

            – Leo Liu-MSFT
            1 hour ago

















          Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

          – Leandro Santos
          2 hours ago







          Thanks. That is a shame. If WIT are not set to the correct iteration it probably wont be seen by development team. Can we use templates to create the WIT?

          – Leandro Santos
          2 hours ago















          @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

          – Leo Liu-MSFT
          1 hour ago





          @LeandroSantos, I understand how frustrating this is for you. You can submit a user voice here , when there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously. At this moment, we have to give it actual Iteration Path instead of variable. Besides, we could use template to create the WIT, document: docs.microsoft.com/en-us/azure/devops/boards/backlogs/…. Have a nice day!

          – Leo Liu-MSFT
          1 hour ago










          Leandro Santos is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Leandro Santos is a new contributor. Be nice, and check out our Code of Conduct.













          Leandro Santos is a new contributor. Be nice, and check out our Code of Conduct.












          Leandro Santos is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54257736%2fcreate-a-workitem-after-build-fails-with-current-on-iterationpath%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Homophylophilia

          Updating UILabel text programmatically using a function

          Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage