1. 程式人生 > 其它 >[轉]Jira ScriptRunner 外掛使用總結

[轉]Jira ScriptRunner 外掛使用總結

本文轉自:https://www.jianshu.com/p/be35d413de59#comments

我司專案需要在JIra上開發一些自動化的功能,因此研究使用下了這個外掛,在此總結記錄。

在查詢新外掛可以搜尋找到,價格感人,於是某寶解決。

Xnip2018-11-08_11-23-20.jpg Xnip2018-11-08_11-30-42.jpg Xnip2018-11-08_11-32-58.jpg

​ 高亮的部分是ScriptRunner外掛提供的功能

幫助資訊

參考文件是可用資訊的最大來源,官方文件地址:https://scriptrunner.adaptavist.com/latest/index.html

Snipaste_2018-11-08_11-39-42.png

官方YouTube地址:https://www.youtube.com/user/AdaptavistEnterprise/videos

然後就是谷歌或百度了。

設定開發環境,方便除錯

下載示例工程,設定本地開發環境,以便進行本地除錯。參考:https://scriptrunner.adaptavist.com/latest/jira/DevEnvironment.html

主要使用的功能

功能用途
Behaviour https://scriptrunner.adaptavist.com/5.4.38/jira/behaviours-overview.html
Script Console 除錯控制檯,可以執行程式碼進行一些除錯
Built-in Script https://scriptrunner.adaptavist.com/5.4.38/jira/builtin-scripts.html
Script listeners https://scriptrunner.adaptavist.com/5.4.38/jira/listeners.html
Script Fields https://scriptrunner.adaptavist.com/5.4.38/jira/scripted-fields.html
REST Endpoints https://scriptrunner.adaptavist.com/5.4.38/jira/rest-endpoints.html
Script Fragments https://scriptrunner.adaptavist.com/5.4.38/jira/CustomisingUI.html
Escalation Services https://scriptrunner.adaptavist.com/5.4.38/jira/escalation-service.html
Script JQL Functions https://scriptrunner.adaptavist.com/5.4.38/jira/jql-functions.html

注意: 通過網站文件右上角可以切換版本,不同版本描述的詳細程度不一,可以參考其他版本。

  • Behaviours 更改欄位行為

Xnip2018-11-08_15-44-56.jpg
  • Script Fields 自定義指令碼欄位,該欄位的值是通過指令碼進行獲取或計算出的

Xnip2018-11-08_16-06-32.jpg
  • REST Endpoints 定義對外訪問的介面

在指令碼內不允許直接訪問外部站點


Xnip2018-11-08_16-08-21.jpg
  • Script Fragments 更改頁面,新增按鈕等

Xnip2018-11-08_16-09-53.jpg

外掛的指令碼語言是Groovy,與Java相容



作者:測開三劍客
連結:https://www.jianshu.com/p/be35d413de59#comments
來源:簡書
著作權歸作者所有。商業轉載請聯絡作者獲得授權,非商業轉載請註明出處。