logo

NJP

Bitbucket and ServiceNow: Link Commits to Stories

Import · Jan 16, 2023 · video

[Music] hey everyone it's Justin thank you for watching and welcome to my house that's Justin's house in this video I want to show you bitbucket and servicenow working together yes that's right I had a use case where a customer asked can I get bitbucket uh commits associated with stories in servicenow and I was like sure sure you can do it and uh I ended up wanting to go do this myself to figure it out so that's what I'm going to show you in this video what I've got up here behind me is a story I created this is a story in agile teams in service now if you're not familiar agile teams is part of strategic portfolio management sometimes it comes as an add-on depending on how you subscribe to servicenow but essentially it lets you have stories and ethics and backlogs and be able to do Sprints and a complete work a lot of us in the ecosystem use this particular functionality to implement a service now so behind me I've got a story and this story I've got a story number a descriptions an acceptance criteria in the description or short description in a long description and that's all I needed for this I've already got it saved what's going to be important is this story number so I want to copy that story number and the use cases a developer is going to go into something like bitbucket and they're going to have code that they're actually changing like you can see here and so that particular code when they do something like make a commit which you can see that button just over my or behind my head right there when they make a commit best practice standard practice is for them to make the commit and leave a message on that commit saying what they did saying what they did so typically you add the story number to that particular commit with some message about what you did and that's the integration here so when this button is um when I hit commit on this button it is going to let servicenow know that this commit has been made and in servicenow I've got a flow that I wrote in flow designer that's going to receive that and it's going to create a commit record and then look up the story and Associate it to that commit record based on what I put in that commit message so let's hop back over here to the story I didn't change anything all I did was copy that story number up here so I'm going to go down here one of the things I did add is a related list for my table that I made called bitbucket commits so you see that table there I'm just going to right click and hit refresh and we should see that particular commit come through there it is I've got bitbucket commit 1011 and it's got my name and the date the hash a link all the stuff that I put in there so that I could know what it is if I click on that commit I can see all the information that I received so you see that it was a commit I have the message showing the story number and if you look really closely had already Associated the story that we were just on and that's how it showed up on the related related list to this particular record I could preview that so you could see it here so now they are linked together and if I wanted to click on this link that's part of the commit that'll take me back to bitbucket and I can see if this was a brand new file that was put in with that JavaScript or that function down here below that does that actual or does whatever function that actually does that meets the criteria of that story now let's just show one more thing here let's go back to the story and let's say we've got this bitbucket commit but oh we realized there was a missing apostrophe or something else that's off so I'm going to go view the file here and then I'm going to edit the file and change something and we're going to recommit it so I'm going to do a couple of things and I recommit it I'm going to come in here I'm going to put a comment in and I'm just going to type in here we'll just save this uh this is the recursion to find the requested value given the key and I just wanted some comments in there so we'll go ahead and Commit This so I've got a second commit and let's just say I'm a creative developer and I decide I'm going to put my story number at the end in parentheses instead of at the beginning so when I did this particular flow I made sure that it was using rejects that I consulted with an artificial intelligence on exact red Dash like I needed thanks for a friend for recommending that I do that because I don't have to remember how regex works and it's going to go ahead make that commit and if we come back over to our story we had the one commit down here below and you'll see when I hit the refresh list in here we should see the second commit that I just did live in front of you come on through so now I have two commits associated with one story and that's how it works in real life everybody is that you're making several changes to the code probably for a particular story so now there's that second commit if I click on it it'll take me to that and there's that comment that I added this is the recursion to find the requested value given they're given not give the key so that's it that's my integration between agile teams and bitbucket to show that we can be working in service now to do our planning to do the kind of story planning and maybe roll that up to a project within the pmo or having a product manager or someone managing a backlog actually manage those stories and Sprints but when I do something in bitbucket like make a commit and put that story number in there no matter where I put it in the commit message when it comes back to servicenow we can find it record it make sure it's associated with the story and now everybody has visibility into what's going on with those commits and bitbucket when they're looking at a story in agile teams in service now I hope you found this video helpful if you did please like Please Subscribe or share with somebody that you think might be interested in integrating bitbucket and servicenow and until next time don't forget to always be learning [Music]

View original source

https://www.youtube.com/watch?v=RSnDEfEDbaA