The other day, I was in a job interview where the company wanted to have someone, who can set up a procurement process in Jira. I told them I could do this, but was also excited to prove to my self it the next day. It took me one day to build a MVP, which showcases the use of
In this article, I’ll walk you through the solution without documenting every click. Atlassian Cloud changes regularly, so I’ll focus on the concepts and configuration rather than UI details that may soon look different.
Let's say Emma is working in the company's marketing department and needs more paper. Before her order goes to the procurement department, she needs Olivia's permission. Olivia is the manager of the marketing department. Once Olivia approves the order it goes to Mason, who will find the best vendor and place the order there. The workflow might look like this:
But wait, those are things that somebody DOES, not that something IS, so I better use this:
Of course, I also needed to build the declined path, and the resolved state:
By using default statuses I got the following workflow:
That was the final workflow. It is somewhat simplified, but will suffice.
Atlassian provides free development sites for its cloud products. Go to http://go.atlassian.com/about-cloud-dev-instance and you'll get a site with five free users (but only one agent 😑). I already had one and I wanted to build the procurement workflow into that site.
So I invented Emma, Olivia and Mason, gave them a face, a nice avatar, and an Atlassian account. As email addresses I used my own and added +emma, +olivia and +mason before the @. So Atlassian would treat them as individual addresses, while there was only one inbox. Inviting them onto my new site worked like a charm.
I added the three new users into the Atlassian user group jira-users-site. Emma and Olivia also got into jira-user-marketing-site and Mason into jira-user-procurement-site.
Those groups act as the single source of truth, so it allowed me to set up the procurement space access without any personal accounts:
I also used those groups for Assets relationships, and the departments users can select in the portal, as you'll see later.
At first I wanted to have Assets schemas for departments, employees, and roles and link them all together. But as it turned out I just need departments. Those departments have one manager and multiple members. The manager for Marketing is Olivia and the members are all in the Atlassian user group jira-user-marketing-site. Hooray for groups!
In a real environment I would have put Olivia in a group called jira-managers-marketing-site and use it here, but decided against it, so Assets looked a bit fancier.
Next I configured the procurement space. It is a JSM space, where Emma can submit her request for more paper. I created a new work item Order and made it the only work type in the procurement space. I also created a new request type and a custom field Department, which references Assets objects: objectType = "Department" AND Active = true
I also added the filter work item scope "Member Group" HAVING user("currentReporter()"), so Emma can only select the marketing department.
Please take a moment to appreciate this beauty. Whenever a new coworker is added, us Jira admins have only to put that coworker in the user group(s) of their department(s). By this, they are member of the space, linked in Assets, and can order stuff for their department.
I set up an automation which is triggered, whenever a new request is created. It looks for the selected department and asks Assets for its manager:
This manager is populated to the system field Approvers. This Approvers field is used in JSM's native approval process.
So I built the workflow mentioned above.
I implemented JSM's native approval process into the state Waiting for approval. As the Approvers field is already populated with the department's manager, I just needed to select the approve and decline transitions.
I didn't forget to put in the appropriate resolutions in the transitions leading to Canceled and Resolved, to ensure that Jira reports and filters recognize those requests as completed.
Next I did some improvements regarding customer communication. So a validator for Due date was necessary in the transition form In progress to Pending, but putting in the expected delivery date shouldn't be a problem for Mason.
Then I set up automations for every transition, to show the customer where we stand in the procurement process and what to expect next. I did it as comments, but feel free to implement any channel your company prefers.
Finally, I set up a scheduled automation that runs once a day and searches for requests that are at least one day beyond their due date and have not been completed:
By now, this looks good enough. The model can grow from here, with possible extensions like
But the core structure can remain the same. Testing looks fine and I hope the interviewer assesses my skills correctly. This is my first article. If you liked it, feel free to leave a thumbs-up. I’ve heard that every thumbs-up brings me one step closer to Atlassian swag. 😉
Karsten Gutjahr
8 comments