Automating your JIRA tasks using UiPath
When you automate the routine tasks of the project management team, you can deliver greater output and create a space for more projects. As complexity increases with the increase of projects, automation can help you stay connected and collaborate with the team without missing out on any information. There are a lot more benefits like this with automation. So let’s start exploring! In this blog, we will be seeing how to automate the operations of the project management tool, Jira.
Jira is a powerful project management tool that helps teams to effectively collaborate and work on projects in an orderly manner. In Jira, we can create, edit, track issues, and bugs. This blog briefs on how to manage these operations with UiPath.
In Jira, issues are nothing but the tasks assigned to the team member by the manager or team leader. We can track, add due dates, subtasks, attachments, and many more to the issues. So this is the basic workflow of Jira. Here I have mentioned the different iterations of automation as versions. Ok! Let’s get started!
In our first version, let us have a kanban board where we can have two issues, LOGIN_ALERT_12345_P1, and LOGIN_ALERT_12344_P1 in the backlog board. Our objective is to listen to incoming issues and move issues from the backlog column to the done column. Before moving to done, we must add a comment “Completed” in the comment box. If there is no issue, then the bot should keep listening to the backlog column until a new card is added.
So to do this, first, we have to click on the card. A window will appear. In that window, we can add a comment and by using the drag and drop we can move the card or issue to any column we want. Let’s do this with UiPath.
Open a new process in the UiPath, use open browser activity and specify the URL of the kanban board. Then use the element exists activity to indicate the card which we should listen to. Then set the output variable as imageFound. Then click on the edit selector in element exists activity. Open Uiexplorer and on the right-side pane, click on unselected items, enable the inner text checkbox. Then in the editor, change the inner text value to LOGIN_ALERT *. This will detect all the element which starts with login_alert. Now use the imageFound variable of flow decision activity. If the output is true, then use click activity to select the card from the column. Now use type into activity and indicate the comment box. In the comment box, type Completed. After doing so, click on the dropdown menu and select on done option.
Then add a refresh activity, for refreshing the browser. Then add a delay of 5s and connect the node again to the element exists activity.
If the element does not exist, it refreshes and again checks whether the element is present or not. Therefore this process acts as a listener.
The final workflow will look like the below:
In the kanban view, we can view all the columns and their updated issues. This will be a great feature for having an overview of all the issues. But when it comes to selecting the card particularly under the backlog column, UiPath finds it difficult to detect. Since all the cards have similar web attributes there will be no difference. When we try to select the cards in the backlog, the cards in the other columns will also get selected. This will be a big drawback in the first version. So we will solve this using a different approach which we will see in this second version. In this version, we can use the issues and filters tab which is seen in the left side pane. We can make use of open issues to view all the open issues. This view enables easy usage of the features than kanban view
We can use the workflow of the previous version itself just by making a few changes to it. In the open browser activity, change the URL to the page listing only open issues. Then in the element exists activity, indicate the cards in the open issues. Likewise, change the click activity and type into activity to indicate their corresponding fields. This method offers a streamlined workflow and a simplified view.
In this version, we will be triggering time in the description box. In the workflow, first, we will have an open browser activity, element exists activity and workflow decision. If the workflow decision is false, then add a refresh activity and a delay of 5s. Connect it again with the element exists activity hence it will act as a listener.
Let’s split the process into 3 stages. First, we need to parse the card details in order to enter the login system. Second, we need to get the details from the login system. Third, we need to compare the triggered time in the description and time in the login system, then attach the screenshot, add comments and move the card either to the manual investigation or done column.
Let’s have the sequence called parse details. In the sequence, we use get text activity to get the details of the card. Let’s say if the card title is LOGIN_ALERT_12345_P1 we can use regex and parse the customer id, issue-level, and type of alert.
The final sequence will look like the above.
Now create another sequence naming get the data. This sequence will get the data from the login system. First, we need to direct to the login system using open browser activity and using the parsed text, enter the customer id 12345. Now the login system gives the corresponding details. By using get text activity all the elements from the login system.
The sequence will look like the above.
Now the create another sequence called task closure. Here add an if activity and compare the dates acquired from the login system and from the card. If the login system is greater than or equal to the issue card date then we should attach a screenshot and a comment on the card details. Move the card to done. If it fails, then attach a screenshot and comment the details and move to manual investigation.
The final workflow will look like the above image.
Let’s have another card which contains TRANSACTIONALERT(CUSTOMER ID)_(ISSUE LEVEL) and triggered date and time. In this scenario, when we try to move the card to done or manual investigation, only the previous card details will be displayed even after refreshing the browser. This is a major drawback. To handle this issue, we can click on an advanced search where there will be only backlogs by default. We will see how to do this in the fourth version.
In this version, we have both the cards transaction alert and login alert. If the card is login alert then, we have to do the above process. If the card is transaction alert, then we have to get the screenshot of transactions made by the customer and then attach the screenshot and CSV that contains all transaction details. In the comment field, we need to comment only on the first 10 transactions. Like login alert, we need to check the trigger date and compare it with the transaction system date.
To do this we need to make some more changes in the workflow. In the get data sequence add switch case. Give the variable which is used for extracting card information. By using regex we can get either a login alert or transaction alert. By using a switch case, we can decide which workflow to process. If the card title contains a login alert then go to the login system. If the title contains transaction alert, then go to the transaction system.
The sequence will look like this.
In the task closure sequence after attaching screenshot, we need to make some more changes. Add another if activity, this is used to select which data to comment on, either the login data or transaction data. If it’s login, then we can comment the login data. Instead of using type into activity, we can make use set to clipboard activity and then paste it in the comment field.
If the condition fails, then use while statement to loop through all the rows in the transaction system. Our requirement is to get only the first 10 rows. In the while loop condition, assign an integer which has value 0 is less than 11. Let’s say Count < 11, whose value is 0. Now inside the loop, increment the counter to 1.
Then add get text activity, edit the selector, change rowname value to * and tablerow value to Count. So tablerow is row count. If the count is 3 then it specifies to 3rd row in the table. Set the value to the clipboard and in the comment field, use hotkey ctrl+v to paste the data.
For more understanding you can take a look at the video:
Contact us now
Trusted by the best