iT邦幫忙

2023 iThome 鐵人賽

DAY 6
1
IT管理

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

Day6-又是樸實無華的開單日常-你卡一個 Bug ,Jira 自動抓交替來幫你看!

  • 分享至 

  • xImage
  •  

各位老鐵們,晚安~~
本來今天要練習 DevOps 的自動化,但覺得一下子跳到 DevOps 有點太快了,因此在發文前一小時臨時改內容為「又是樸實無華的 Jira 開單日常」系列。

今日分享主題:當一個 issue 被開出來時,如果只有你一個人負責,是不是常常會空虛寂寞覺得冷,憑什麼自己在那裡累,同事在那裡什麼都不知道!
哼哼,這個時候你需要~噹噹噹 When a bug is created → add someone as a watcher

  1. Workflow Keywords
  2. 啟用 When a bug is created → add someone as a watcher Automation template

Workflow Keywords

1. Watcher:Watcher 整個問題的生命週期中,會收到來自該 issue 的變更通知,所有欄位變更(all field changes)、負責人變更(reassignments)和備註(comments)。當然系統管理員可以變更設置 Watcher 接收哪些通知。想了解更多可詳閱 Using watchers and @mentions effectively in Jira
2. Bug:這是 jira software 的 issue 中,其中一種類型。想了解更多 issue types,可以詳閱 What are issue types?
3. Jira automation triggers: 即 Jira 自動化觸發,每個規則都開始於一個觸發,由 Trigger 啟動了你所設定的自動化執行。觸發器會掃描 Jira 中的事件,例如當創建一個問題或者當字段值更改時。觸發器可以設定為按照計劃運行,並且在應用於規則之前可以進行自定義配置。想了解更多可以詳閱 Jira automation triggers


啟用 Create issue Automation template

今天要練習的主題: When a bug is created → add someone as a watcher

當有人開啟 Bug 這個 issue 時,不用擔心只有自己扛,Jira 會自動抓團隊成員一同來當 [Watcher]

  1. 首先從專案 Board 點擊左邊功能區的 [Project setting]。https://ithelp.ithome.com.tw/upload/images/20230920/20162673rks8sgd5Q9.png

  2. 點擊左邊功能區的 [Automation]。https://ithelp.ithome.com.tw/upload/images/20230920/20162673aHW1eeJHiE.png

  3. 點擊中間上方的 [Rules] 、[Audit log] 、 [Templates] 的 [Templates]。
    https://ithelp.ithome.com.tw/upload/images/20230920/20162673xgW5g4X7RJ.png

  4. 進到 Automation templates 選單後向下拉。https://ithelp.ithome.com.tw/upload/images/20230920/201626734TQRmk2H5y.png

  5. 找到 When a bug is created → add someone as a watcher ,並點擊進去。https://ithelp.ithome.com.tw/upload/images/20230922/20162673wPP7buq9Vn.png

  6. Rules details 已經自動的填完 [Name][Description]
    [Name]:When a bug is created → add someone as a watcher

[Description] :Streamline bug reporting by notifying the right person of a new bug. When a new bug is created within the project, this rule will automatically add your designated team member as a watcher.
https://ithelp.ithome.com.tw/upload/images/20230922/20162673Qr7ILCrxQj.png

  1. 詳看 [When] 的設定

(1)我們也點擊 [When] 了解一下 Automation rules 的設定。
(2)點擊 [Issue created] 的筆 icon 編輯。
https://ithelp.ithome.com.tw/upload/images/20230922/20162673pVVozXjENl.png

  1. **[Create a trigger]**下方有許多手動設定 Trigger 的選項,其選單很長,包括 Recommended 、Issue triggers、DevOps、Integrations、Scheduled、Quick actions、Jira Service Management、Release management 和 Security。在此放置Recommended 和 Issue triggers 的內容供參。
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673PTSFvxGd9k.png
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673uP6wDVJkF1.png

  2. 詳看 [Issue Type] 設定 非 [If]

(1)我們也點擊 [than] 了解一下 Automation rules 的設定。
https://ithelp.ithome.com.tw/upload/images/20230922/20162673fotYPNdWJo.png

(2)Field 可以自己設定,原版設定為 [Issue Type] 這個觀查項目,若想要改成其他觀查項目,也可以用下拉式選單挑選 「Assignee]、Components、Created等等,本次需要是**[Issue Type]**,
https://ithelp.ithome.com.tw/upload/images/20230922/201626739mhUWBFtxl.png

(3)在 [Value」 我們選擇 [Bug]
https://ithelp.ithome.com.tw/upload/images/20230922/20162673FoRag7EViv.png

  1. 詳看 [than] 的設定
    (1)我們也點擊 [than] 了解一下 Automation rules 的設定。
    (2)[Add these watchers] 終於來到設定 Watcher 之處了
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673fHvRPemLJo.png

  2. 我立即設定了我前天加入的同事名稱,最後再按下右上角的 [Turn it on],恭喜完成 ✅並按下,灑花~
    需要兩張圖一起看
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673thaJmEqxG7.png

https://ithelp.ithome.com.tw/upload/images/20230922/20162673GG16O2DD32.png

  1. 開票實驗:但事情還沒有完喔~我們立即做個開票實驗,看看是不是完成自動化。
    (1)到 [Backlog] 開一張票 [II3D-18],Issue type 選 Bug 。
    (2)當個好孩子,把Summary 寫清楚,比如:如果這張票沒有自動抓 同事 做 Watcher 就是一個 Bug
    需要兩張圖一起看
    https://ithelp.ithome.com.tw/upload/images/20230922/201626730tipsCDuWw.png
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673bqwivsIXmU.png

  2. 嚐試做個錯誤設定看會如何?回到 設定處,在 [Then] 的Add these watchers 多加兩個人,按下**[Save][Publish changes]**。
    需要兩張圖一起看
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673vaslWrIfNR.png
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673KUtcIeCern.png

  3. 再開一張新票 [II3D-19]
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673J0STM5xij2.png

  4. 檢查 email 收到主旨「Automation rule 'When a bug is created → add someone a...' failed!」信件,點擊連結看詳情,果然在 [Audit log] 看到 [SOME ERRORS]
    需要兩張圖一起看
    https://ithelp.ithome.com.tw/upload/images/20230922/201626739DWtY8Z3lR.png
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673pJbMk5HUhN.png

  5. 回到 Automation 把同事名字刪除,留下我個人的名字。
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673QE4pkfEKFQ.png

  6. 回到 [Audit log] 看到 設定 成功了。
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673R7R8oIrAr6.png

  7. 再回到 Backlog 查看 tickets,果然看到 Watcher 成功設定完成 ✅。
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673RJOQuXKsCw.png
    https://ithelp.ithome.com.tw/upload/images/20230922/20162673w3xpzWjtww.png

太好了~至於為什麼剛剛會設定失敗,我也不太確定,只能下次再查查了。
本日練習結束,謝謝大家觀看。
/images/emoticon/emoticon08.gif


上一篇
Day5-你不是不好只是太用腦,快啟用 Jira 自動提醒你有五天沒更新票了!
下一篇
Day7-又是樸實無華的 Jira 開單日常- 任務到期前1天自動寄催債信
系列文
每天利用 Jira 開單時,練習一個密技,應該不是薪水小偷吧!?30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言