iT邦幫忙

2023 iThome 鐵人賽

DAY 10
1
IT管理

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

Day10-又是樸實無華的 Jira 開單日常-Auto-create sub-tasks 省力不少啊!

  • 分享至 

  • xImage
  •  

今天又是忙碌的一天,今天公司在 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://ithelp.ithome.com.tw/upload/images/20230925/201626732uIRx7ZTOP.png
圖片來源 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 選單後向下拉
  1. 拉到頁面最下方,找到 See more templates in our automation library ,並點擊進去。
    https://ithelp.ithome.com.tw/upload/images/20230924/20162673W15zUhQB6I.png

  2. 來到了 Jira automation template library 的頁面,我們把頁面向下拉。https://ithelp.ithome.com.tw/upload/images/20230924/20162673keJ8PjGi95.png

  3. 找到 Popular categories 中的 Most popular automation 選單,點擊 [See template -> ]
    https://ithelp.ithome.com.tw/upload/images/20230924/20162673U6sql2xjlJ.png

  4. 來到了 Most popular Jira automation templates頁面,我們把頁面向下拉,來找到今天的主題。
    https://ithelp.ithome.com.tw/upload/images/20230924/20162673ya7X18LvuN.png

  5. 找到今天的主題並 [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.
    https://ithelp.ithome.com.tw/upload/images/20230925/20162673fJiMQgEttc.png

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

https://ithelp.ithome.com.tw/upload/images/20230925/20162673Fm16rwRgKE.png

https://ithelp.ithome.com.tw/upload/images/20230925/20162673oszcZhUNLT.png

https://ithelp.ithome.com.tw/upload/images/20230925/20162673q2cXlvYeZ8.png

https://ithelp.ithome.com.tw/upload/images/20230925/20162673boLDJLlvab.png

  1. 回到 Automation template 頁面,點擊 [Create rule]
    https://ithelp.ithome.com.tw/upload/images/20230925/20162673D1DIvFvOkX.png

  2. 進到 When:Create a trigger,Select an event or schedule.我們把頁面向下拉,來找到 Issue created
    https://ithelp.ithome.com.tw/upload/images/20230925/20162673JfoB2F2gGV.png

https://ithelp.ithome.com.tw/upload/images/20230925/20162673BGpUexbxF1.png

10.完成 When:Issue created Rule is run when an issue is created 設定。
https://ithelp.ithome.com.tw/upload/images/20230925/20162673WrMxsC3Dhr.png

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

(2)我們選擇 Than:Add an action 。
https://ithelp.ithome.com.tw/upload/images/20230925/20162673pYz8GHa54U.png

(3)在 [Add an action] 下方的選單中點擊 [All component]旁邊的箭頭
https://ithelp.ithome.com.tw/upload/images/20230925/20162673xf6i8ZDXPT.png

(4)從 [All component] 的下拉式選單挑選 [Issue actions]
(5)再從下方的選項中點擊 [Creat sub-tasks]
https://ithelp.ithome.com.tw/upload/images/20230925/201626732wFZslbZ70.png

  1. 設定 一次自動新增多個Sub-tasks
    (1)中間的編輯區會出現如紅框所示的 subtask 欄位,可自行新增修改 [Summary]。
    https://ithelp.ithome.com.tw/upload/images/20230925/201626737hUANm1QDW.png

(2)我自行新增了 4 個 subtasks,並按下 [Save]
https://ithelp.ithome.com.tw/upload/images/20230925/20162673yrks4i1zv4.png

  1. 為這個 automation 命名並按下 [Turn it on]
    本次把這個 rule 命名為 Auto-create sub-tasks
    https://ithelp.ithome.com.tw/upload/images/20230925/20162673oWDIKsoFSj.png

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

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

(2)我們選擇 Than:Add an action 。
https://ithelp.ithome.com.tw/upload/images/20230925/20162673IYoRqnPS7K.png

(3)在 [Add an action] 下方的選單中點擊 [Create issue]
https://ithelp.ithome.com.tw/upload/images/20230925/20162673lXGmfplDkb.png

  1. 設定第二個 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]
    https://ithelp.ithome.com.tw/upload/images/20230925/2016267332szjWJwP2.png
  1. 因為有修改設定,請按下 [Publish changes]
    https://ithelp.ithome.com.tw/upload/images/20230925/20162673ERprqfHvNJ.png

  2. 回到 Rules list ,這個 Rule 已經設定完成。
    https://ithelp.ithome.com.tw/upload/images/20230925/20162673Cx5NCRi2zV.png

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

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

今天的練習就到這裡啦!我們明天見。
對了,我的確診症狀好多了(沒有人在乎~
https://ithelp.ithome.com.tw/upload/images/20230925/20162673ZBrmUkRiQP.png


上一篇
Day9-確診了也要寫文章!又是樸實無華的 Jira 開單日常-誰開單誰負責啦!
下一篇
Day11-不想花時間做文件-你需要自動生成 Retro Confluence 的 DevOps 密技
系列文
每天利用 Jira 開單時,練習一個密技,應該不是薪水小偷吧!?30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言