2023 iThome 鐵人賽文章-Day10-又是樸實無華的 Jira 開單日常-Auto-create sub-tasks 省力不少啊!

Gobby Chen
Titansoft GOJira!
Published in
9 min readMay 8, 2024

iThome 鐵人賽 IT管理類別文章

每天利用 Jira 開單時,練習一個密技,應該不是薪水小偷吧!? 系列

我在新加坡商鈦坦科技工作,Daily work 就是用 Jira 跑 Scrum 或 Kanban 計畫、排程、檢視,用 Confluence 做 wiki和紀錄,有時也會搭配其他工具,雖然日常使用上沒問題,但其實有些密技,能讓 workflow 更順、更有效率且省力!

於是,不是工程師也有工程師魂,我收集了許多同事和朋友使用 jira 的密技,並且在 30 天內實際測試,看看是不是真的會改善IT工作日常!如果你看到文章也有密技或問題,歡迎來交流。

前言

今天又是忙碌的一天,今天公司在 DevOps Day 有舉行一場工作坊,我們在其中練習了幾個自動化,就有參與者表示想要了解更多自動化,我就把 iThome 鐵人賽文章公布出來,希望對有意想了解更多 Jira Automation 設定的朋友有幫助。

今日分享

  1. Keywords
  2. 啟用 Automatically add 4 sub-tasks on issue creation

Keywords:issue types

因為今天的自動化主題會接觸到 Subtask,我們先來了解 Jira 的 issue type
Issue type

用不同的 type 協助你區分不同類型的工作,具有幫助識別、分類和報告在 Jira 上的工作,可以幫助團隊在工作流程中建立更多結構。以下的圖是 jira 預設的類型,有層級之分,最大的第一層是[Epic],由[Epic],依不同需求可展開為第二層的[Story]、[Task]及[Bug],第三層是第二層更細分的[Subtask],而以滿足專案和團隊的需求。

圖片來源 https://bigpicture.one/blog/understanding-jira-issue-types/
了解更多

Automatically add 5 sub-tasks on issue creation

回到我們的「又是樸實無華的 Jira 開單日常」系列,今日連載第五期啦!
今日分享主題:
Auto-create sub-tasks
Whenever a Jira issue is created, automatically create 5 sub-tasks with certain fields populated. Start simple and add depth as you go.

我會一次練習設定兩種 Subtask 設定方式

  • 一次開多個 Subtask(可以詳看下方練習 11.-13.)
  • 一次只開一個 Subtask(可以詳看下方練習 14.-15.)
  1. 找到 Automation Templates
  • 首先從專案 Board 點擊左邊功能區的 [Project setting]
  • 點擊左邊功能區的 [Automation]
  • 點擊中間上方的 [Rules] 、[Audit log] 、 [Templates] 的 [Templates]
  • 進到 Automation templates 選單後向下拉

2. 拉到頁面最下方,找到 See more templates in our automation library ,並點擊進去。

3. 來到了 Jira automation template library 的頁面,我們把頁面向下拉。

4. 找到 Popular categories 中的 Most popular automation 選單,點擊 [See template -> ]

5. 來到了 Most popular Jira automation templates頁面,我們把頁面向下拉,來找到今天的主題。

6. 找到今天的主題並 [Go to rule] 。主題為 Auto-create sub-tasks,Whenever a Jira issue is created, automatically create 5 sub-tasks with certain fields populated. Start simple and add depth as you go.

7. 詳閱 library 設定的步驟及內容(When,If,Then)等的設定。

8. 回到 Automation template 頁面,點擊 [Create rule]

9. 進到 When:Create a trigger,Select an event or schedule.我們把頁面向下拉,來找到 Issue created

10. 完成 When:Issue created Rule is run when an issue is created 設定。

11. 設定 Than
(1)點擊 [Add component] 後,該 Component 變成 New component Select a new condition or action

(2)我們選擇 Than:Add an action

(3)在 [Add an action] 下方的選單中點擊 [All component]旁邊的箭頭

(4)從 [All component] 的下拉式選單挑選 [Issue actions]
(5)再從下方的選項中點擊 [Creat sub-tasks]

12. 設定 一次自動新增多個Sub-tasks
(1)中間的編輯區會出現如紅框所示的 subtask 欄位,可自行新增修改 [Summary]。

(2)我自行新增了 4 個 subtasks,並按下 [Save]

13. 為這個 automation 命名並按下 [Turn it on]
本次把這個 rule 命名為 Auto-create sub-tasks

你以為結束了嗎?我們還有另一個 Than 還沒有設定喔。

14. 回到 Automation 設定區,以同樣的路徑再設定一次 Than
(1)點擊 [Add component] 後,該 Component 變成 New component Select a new condition or action

(2)我們選擇 Than:Add an action

(3)在 [Add an action] 下方的選單中點擊 [Create issue]

15. 設定第二個 Than:Create a new
(1)留意這裡的文字是否依右邊設定而改變。
(2)修改內容:

  • [Project]設定為 [Same project],這樣自動化才會顯示在這個專案中。
  • [Issue type]改為 [Subtask],因為我們要開的是 Subtask。
  • [Parent issue]維持 [Current issue]
  • [Summary]輸入 [book retro]
  • [Description]輸入 [Let’s look back to see what we can learn from {{issue.key}}]
  • 拉頁面至下方並按下 [Save]

16. 因為有修改設定,請按下 [Publish changes]

17. 回到 Rules list ,這個 Rule 已經設定完成。

18. 驗證 Automation
(1)我們回到專案的 [backlog],直接新開一張票,其 [Summary] 為 day11 後按下完成。
(2)再次點擊這張票,立即看到 [Child issue] 長出剛剛設定五個 subtasks,其 Summary 一字不差的開出來。是不是超級方便的啊~~

Auto-create sub-tasks-->設定成功

本篇的練習就到這裡啦!我們下一篇見。
對了,我的確診症狀好多了(沒有人在乎~

作者介紹

--

--