Adventures of a wannabe geek!

Ranting within

Custom Blogging Workflow With YouTrack

In the past week, I have started using YouTrack 3.0 in the cloud as a think tank of blog posts that I want to write. Previously I had used Trello. there was no particular reason for moving away from Trello other than curiosity about what YouTrack could offer me. On setting up YouTrack I added a project to start the tracking of the blog posts. On adding the first post, I was given the following state workflow:

image

As you can see, you can pretty much change the state to be any other out of the box. I wanted to use this as the opportunity to create a custom workflow for YouTrack. I was able to download the YouTrack Workflow Editor and start the editor. Hadi Hariri has created a post on the basics of the workflow editor on his blog but this was only to create a stateless rule. I wanted to create a ‘statemachine’ rule. Basically the flow was to be as follows:

- Initially the issue created would be assigned to ‘To Write’

- Issues in ‘To Write’ could be changed to ‘In Draft’

- Issues in ‘In Draft’ could be changed to ‘In Review’ when complete or ‘To Write’ when paused

- Issues in ‘In Review- can be changed to ‘Published’ when closed or ‘In Draft’ when failed review

I immediately got to work and created a new rule as in Hadi’s post but this time I chose a statemachine rule. This gave me the following template:

image

I had to add the first transition. That when initially opened the state would be ‘To Write’:

image

I then had to implement the changes allowed to State from ‘To Write’. This says that when an issue in To Write, the only state it can move to is ‘In Draft’. As you can see, there is a stub of the state for In Draft created now by the Editor. I was then able to say that when the post is In Draft, it can move to In Review when finished writing or To Write when paused:

image

I was then able to implement that when the post is In Review, it could change to Published when verified or In Draft when it didn’t pass review. This gave us the stub for Published. As there were no state changes allowed when published, I just had to leave the Published state empty as shown:

image

After uploading the workflow to the server, as per Hadi’s instructions, I then had to attached the workflow to my project. I went to administration and chose the project type and then the workflow tab, I clicked the button ‘Attach workflow’. This game me the following:

image

I just had to choose the workflow I had created (stack72-blogging-stateflow) and I could then see the transition screens were working as appropriate:

image image image image

This was very easy. I must pay credit to the Youtrack team for such a simple workflow editor. IT has intellisense and was able to offer me all sorts of options on clicking control + spacebar together. Thanks also to Hadi’s post for introducing me to the Workflow editor.