iT邦幫忙

2023 iThome 鐵人賽

DAY 13
1
IT管理

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

Day13-完成練習 Daily Slack summary 自動化,但卻出現 SOME ERRORS,有個真 Bug 要解了啦!

  • 分享至 

  • xImage
  •  

今日分享

  1. Daily Slack summary

Send a daily Slack summary of Jira issues left in the backlog.

今天又要來嚐試直接手動設定 Automation rule,會照著 Jira automation template library 來設定,今天是 Jira 連結 Slack 的第一篇,但有趣的是,當我做完練習時,卻一點跟 Slack 沒有半毛錢關係?只是寄 email 通知而己?!
https://ithelp.ithome.com.tw/upload/images/20230928/20162673SNmeiiT02p.png

於是我又手賤,在既定的設定規則下,自己動手加了 Send Slack message,以下是我今天的練習。

  1. 找到 Automation Templates
  • 首先從專案 Board 點擊左邊功能區的 [Project setting]
  • 點擊左邊功能區的 [Automation]
  • 點擊右上角的 [Create ruls]
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673M4YkuOZMIr.png
  1. 進到 When:Create a trigger,Select an event or schedule.我們把頁面向下拉,來找到 Scheduled
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673fqmKBB91IE.png

  2. 找到 Scheduled,就點擊進去。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673Sf5zYwZaxq.png

  3. 設定每日掃描時間
    我發現每次要設定提醒類型的 Automation rule,When都會先設定每日掃描時間,這次我一樣設置在 9:00 AM
    https://ithelp.ithome.com.tw/upload/images/20230928/201626733ovkXE5ML2.png

  4. 再點擊左邊的 [Add component] ,立即出現右邊 FOR EACH IF THAN 三個選項,我們選擇 THAN
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673kwtYpFAvAT.png

  5. 進入 Add an action 選單,我們往下拉。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673INr1uH0nUD.png

  6. Advanced 分類中找到 Lookup issues,我們點擊下去。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673vjS669Zy7O.png

  7. Lookup issues 需要輸入 JQL 去協助找到我們要的 Tickets。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673SnSvIVIfmv.png

  8. 我們在 JQL 欄位輸入 status = "backlog",再按 「Save]。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673QOy0js4v8o.png

  9. 點擊左邊的 [Add component] ,再設定一個 New component,我們再選一次 THAN
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673gfbJ1N1Wqe.png

  10. 進入 Add an action 選單,我們找到 Send email,並點擊進去。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673WfkOJVAAQS.png

  11. Send email 有三個地方需要設定,包括 收件人 TO CC BCC、Subject 和 Connect,我的設定如下

  • 收件人:Asignee
  • Subject:{{issues.size}} issues in backlog
  • Content:
<table>
   {{#issues}}
   <tr>
      <td>{{key}}</td>
      <td>{{summary}}</td>
   </tr>
  {{/#}}
</table>
  • 按下 [Save]

https://ithelp.ithome.com.tw/upload/images/20230928/20162673fO76yve9sK.png

  1. 為此 Automation 取個名字
  • 我們在右邊的空格內填入 Daily Slack summary 的文字。
  • 填入的文字立即出現在左上方。
  • 按下 [Turn it on]
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673Ptv4BHYisW.png
  1. 完成 ✅
    https://ithelp.ithome.com.tw/upload/images/20230928/201626734MAzMeJHXp.png

  2. 回到 Automation 設定頁,在 [Rule detial] 可以看到內容都自動設定好了。
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673j5psg2LSZZ.png

等等,說好的 Slack 呢!哈哈,我才不會忘記你呢!!!!!!!

  1. 再次點擊左邊的 [Add component] ,再設定一個 New component,我們再選一次 THAN,在選單中找到 Notifications 分類的 [Send slack message]
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673bpiYM7i4EX.png

  2. Send Slack message 的設定有三個地方要輸入

https://ithelp.ithome.com.tw/upload/images/20230928/20162673udOPdSGOlc.png

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

  2. 我試著按下 [Run rule] 後,點開 [Audit log],發現有 SOME ERRORS
    https://ithelp.ithome.com.tw/upload/images/20230928/20162673HnegL7VIqu.png

我決定先把這篇試錯文章先記下來,再慢慢的找到 Bug 。

各位我們明天見~


上一篇
DAY12-在 Retro 文件自動匯入 Jira Tickets !同場加映 Plan Sprint 2
下一篇
Day14-第一次 DeBug 就成功 -Jira Auto-alerts High Priority in Slack
系列文
每天利用 Jira 開單時,練習一個密技,應該不是薪水小偷吧!?30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言