Thursday, November 19, 2015

VSTS Extensions - new Era of extensibility

Today Microsoft launched the new Extensibility model and equally importantly, a new Marketplace for extensions and offers surrounding VS Team Services, yes the renamed it .   Extensibility and customization has always been things that I feel very passionate for, so Im proud to have two extensions I’ve been working on in early adopter’s programs - live in the new marketplace.

Back to Extensibility first Extensibility and customizations has traditionally been one of Microsoft stronghold. Then moving to providing a hosted service, Microsoft set out to build it extensible, but things doesn’t always play out as you expect, and during the last 2-3 years the extensibility platform was frozen unpublished. But today Microsoft is back on track again, not only providing an cross platform extensibility platform for 3:rd parties, but making it a key aspect of future development, as they utilize the extensions platform themselves for building and releasing new features, and even repacking parts of the current product as extensions.

Marketplace - A new echo system
Although Microsoft has had a strong community and a large gallery of extensions. But the one thing that’s been hurting the Microsoft Echo system is the absence of a simple one stop shop for acquiring the add-ons needed for your development team/project regardless of if its free or paid. The new marketplace attempts to fill that gap bringing everything together and enabling a commercial backend to enable easy the purchase and help developers monetize on their effort. Hopefully the new Marketplace will bring a new momentum and dynamic both users and developers of extensions and add-ons.

Marketplace  - Live in Preview
During Connect Microsoft launched the new Marketplace, although still in Preview – it already had a lot of extensions and partners present. While anyone can sign up for a free Extension developer account, build, upload and share extensions to other accounts, publishing and making the extension publicly available on the market place is still limited to trusted partners and the early adopters and who have been building extensions and dogfooding the extensibility story in private preview.

Building extensions in private preview
As an MVP and ALM partner, I’ve been constantly nagging about the missing extensibility story during the last couple of years. So then the offer came to join the Private preview and help dogfood and shape the extensibility story, it didn’t take me long to jump onboard.
As the new extensibility model is all based on web technologies, one challenge was to catch up and get up to speed on everything that’s happened on the web for the last 10 years. If that wasn’t challenging enough – building for a platform and SDK that’s constantly growing and moving, with new releases every 3 weeks is also a challenge. To summarize its been a challenging road but also a lot of fun.

Enhanced Export
The Enhanced Export extension is actually my second project I started. Its released as a “personal” project and I got lots of ideas on how to making it even better. The basic is to render data – like test plans or work item queries using templates that the team/project can manage themselves.
https://marketplace.visualstudio.com/items/mskold.mskold-enhanced-export

Test case Explorer The Test case Explorer is released as a Microsoft Labs extension, but developed by Mathias Olausson and me, with much cooperation and engagement from our Microsoft product owner Ravi.
Test Case Explorer lets users view, pivot and filter the “test case” repository without manually creating different quires.
https://marketplace.visualstudio.com/items/ms-devlabs.TestCaseExplorer

17 comments:

  1. Hi Mattias. Many thanks for creating these highly useful VSTS extensions! Quick question: I've tried using the Enhanced Export extension, but When I run the default "Requirement Specification" query, none of the Description or Acceptance criteria content appears. Any suggestions for how to fix this would be appreciated!

    ReplyDelete
  2. In the current version all fields you want output from must be in the query ... If you add the Description field to the query and save the query, hopefully it would be enough to get it included in the report...

    ReplyDelete
    Replies
    1. Yes, thank you. After adding those fields to the query via column options, they now show up in the Enhanced Export. It makes sense now why it wasn't working before. Regards!

      Delete
  3. Hi Mattias, thanks a lot for this extension!

    Unfortunately today I detected that images embedded into description do not show up (Visual Studio Community 2015). I use default template "Requirement Specification".

    Description is included in the query columns. If I copy out HTML, the description column's html contains a valid img tag having attributes like
    src="https://xxxxxx.visualstudio.com/DefaultCollection/WorkItemTracking/v1.0/AttachFileHandler.ashx?FileNameGuid=ace23f79-dd29-436d-814e-7ba31e63112a&FileName=MainWindow-Ticket1016823.gif"

    Any idea how to get this into working?

    Once more: many thanks!

    ReplyDelete
    Replies
    1. Hi, and thank you for your comments.

      Sadly, the root cause of your problem seems to be that VSTS enforces authentication for all call - including inline images.
      The only idea for a current/short term workaround I have, is to keep the images on another source, and simply link to the images in the work item forms.
      Other - untested/verified solution could be to enable alternative authentication profiles, and save the html to a file and connect to VSTS using the alternative authentication logon.

      I've played around a bit with an experimental code to read all images, and package them down into a zip file, but that has a long way to go before it makes it into production.

      Delete
  4. Ah I see, that explains the behaviour.
    Thanks a lot for your efforts.

    ReplyDelete
  5. Hi Mattias, this looks very useful, but I cannot get the icon/menu selection to appear. I have uninstalled and reinstalled the extension, but no luck. I see the "Export Templates" tab in the project settings, but when I run a query and click on a work item and view the context menu, I do not seet the selection foe Export with Template. I also do not see it when I try to do the same for Test Plans.
    I have tried it in VSTS and on-prem TFS 2015 Update 2 RC2. Am I missing something, regarding the operation?
    Thanks,
    Ross

    ReplyDelete
    Replies
    1. Ok, I was clicking on the work items, not the query and the Test plan was being obscured by the width of the column.

      Delete
    2. My next problem is that I can't get a template to save on my on-prem TFS. When I installed the extension on VSTS I saw several templates. However, on-prem, I saw none. I tried copying the ones from the VSTS instance to on-prem, but when I click Save, I never see "Saved Successfully". Also, I can add a new template in VSTS doing the same copy/paste and giving it a new id.

      Delete
    3. Currently there is some minor differences between on-prem and VSTS for extensions. Were working on resolving those issues and hope to have it ready as 2015.2 is officially released.

      Delete
  6. Hi Mattias,

    seems like this could be really useful.

    Unfortunately, the "Requirement Specification" template doesn't quite fit my needs.
    I would like to create my own template.

    Are there any examples or documentation regarding the XSLT format of the templates ?

    Best regards

    Petr

    ReplyDelete
    Replies
    1. HI Petr,
      Glad you like it,
      The 2 templates is included as examples, you can find them if you click the manage template link.
      The format is just plain XSLT (to the version your browser is capable of running).
      However the input data comes with a specific format that’s quite generic. This is a short description of how I develop templates.

      1) I defined the query I want to run as much as possible
      2) I export the query using the standard template- With DEVELOPERS TOOLS activated in the browser.
      3) During the export it dumps the input xml data to the console – I grab at and put it in a file.
      4) I use that file and a xslt editor (VS, or any other xslt editor) to build and test my template.
      Good luck, and drop me an email if you get stuck or run into problems.
      PS. If you like it, please give it a good review in the marketplace DS




      Delete
  7. Hi, I tried to install the Enhanced Export on a on-prem TFS 2015.2.
    The test plan export work fine, but the work item query export fails.
    The Dev Tools console outputs a message about "angular is not defined" on line 12 of serviceWorkItemQuery.js
    And of course, the window remains blank except for a {{ctrl.ErrorMsg}} at the top.

    Any idea ?
    Thanks,
    Johann

    ReplyDelete
    Replies
    1. Tried to ping you on google hangouts for a quick chat...

      Delete
  8. I noticed a couple of the templates (both word & excel) do not open correctly when selecting "Open". Using excel this occurs with the grid template. With word, it occurs using test plan details and test points. I have a book on xslt but thought I would ping you as well to see if there is a quick modification to the templates that can occur. Thanks for any additional information in advance.

    ReplyDelete
  9. Great article. I read this article properly. This is one of the best posts. Thanks sharing this article
    Teefury , Redbubble uk , Spreadshirt us , tshirthell coupon , threadless coupon , Teespring us , Teepublic coupon code , 80stees coupon

    ReplyDelete
  10. What is the original XML document you use for these Enhanced Query exporter templates? I am brand new to XML and XSLT, and trying to customize some of your templates. A colleague recommended I first review the XML, but I am unsure where to find this.

    ReplyDelete