Blog Post

Friday Flyway Tips–Linking Commits to an Azure DevOps Work Item

,

Recently I was doing a demo and a customer asked how I had linked my commit in Azure DevOps to the work item that existed. It’s easy, and tldr; it’s with the commit comment. This post shows how that works.

I’ve been working with Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.

Creating a Work Item

In Azure DevOps, there is a board menu. Under here, one of the subitems is Work Items. You can see these below:

2023-12-13 17_52_28-Work items - Boards

I tend to work from the “Boards” item, which looks like this:

2023-12-13 17_52_22-Westwind Team Features Board - Boards

Let’s assume we have a new item, so I’ll click the “New Item” at the top of the left column. This gives me an edit box, which I’ll type in a name.

2023-12-13 17_54_25-Westwind Team Features Board - Boards

When I hit enter, this gives me a new work item, which you see below, as 250 create products entitty.

2023-12-13 17_55_19-Westwind Team Features Board - Boards

Since I don’t want to leave a spelling error, I’ll edit the title to look better.  Now I have a work item.

Linking A Commit in FWD

In SSMS, I’ll create the products table. Once I do this, I’ll go to Flyway Desktop and refresh the schema model. When I do this, I see my change. I’ll select this and save to the file system.

2023-12-13 18_01_48-Flyway Desktop

Once this is done, I’ll go to the Version Control tab, and I again see my file changed. Here my file is selected, and I’ll enter a commit message, but I’ll include the work item number after a #. This creates a link.

2023-12-13 18_02_45-Flyway Desktop

I now click commit and push. In Azure DevOps, in the Repos –> Commit item, I see my commit.

2023-12-13 18_04_15-Commit 1421f994_ #250 create products table - Repos

Note the details item under my cursor. If I click that, I see commit details and near the bottom, a link to the work item.

2023-12-13 18_04_21-Commit 1421f994_ #250 create products table - Repos

If I click through to the work item, or I access the work item from Boards, I will see my commit linked on the far right of the work item.

2023-12-13 18_04_32-Westwind Team Features Board - Boards

This is very handy to have your actual code linked to the work that it relates to. If I have PRs or multiple commits, as long as you use the #nnn, where nnn is the work item, you’ll have everything linked together.

This is less a Flyway Desktop feature than an Azure DevOps one, but you can access this from Flyway Desktop by writing good commit messages with work item numbers.

Try Flyway Desktop out today. If you haven’t worked with Flyway Desktop, download it today. There is a free version that organizes migrations and paid versions with many more features.

Video Walkthrough

I made a quick video showing this as well. You can watch it below, or check out all the Flyway videos I’ve added:

 

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating