[转]Jira ScriptRunner Send Custom Email

This snippet shows you how to send a custom email. You can use the method inside in any script designed to send an email.

I want to send an email when an issue transitions from In progress to Done to update the customer on their issue status. I can use this snippet inside a post-function script.

  • An outgoing mail server needs to be enabled.

  • An SMTP mail server needs to be configured

This escalation service is used to trigger an email that notifies approvers of pending issues, once their email has been retrieved using the REST Endpoint.

In this example, a reminder email is triggered, after the email addresses of an issue’s outstanding approvers were obtained via a REST Endpoint.

  • For Jira versions prior to 8.10.0, the additional Thread parameters are not required to send the email as shown in the example below:
    def email = new Email(emailAddress)
    email.setSubject(subject)
    email.setBody(body)
    email.setMimeType('text/html')
    mailServer.send(email)

Send an email to all watchers of an issue with the change history items in the last X days. Edit the number of days to go back by changing the lastDays variable. Modify the script to set the jiraIssue variable depending on where you add the script (for example, in a post function use issue.key instead of TEST-1).

As a project manager, I want to keep track of all changes to my watched issues. I need to be up to date with who is working on an issue and what has been changed. I do not want to check each watched issue manually. I can use this script to send me an email with change history items weekly to keep informed.

Original: https://www.cnblogs.com/freeliver54/p/15885396.html
Author: freeliver54
Title: [转]Jira ScriptRunner Send Custom Email

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/545377/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

  • 学校用ipad 4通过vpn上外网方法

    404. 抱歉,您访问的资源不存在。 可能是网址有误,或者对应的内容被删除,或者处于私有状态。 代码改变世界,联系邮箱 contact@cnblogs.com 园子的商业化努力-困…

    技术杂谈 2023年7月25日
    085
  • 一款开源且超好用的网站克隆机 HTTrack

    0x00 前言 我们在学习前端的时候,总是会想着去学习其他人网站是如何制作的,或者我们遇到一些比较有用的知识点的时候,我们可能会选择通过 Ctrl + C / Ctrl + V 去…

    技术杂谈 2023年5月31日
    080
  • Docker 容器中安装 Docker

    本文讲的是在Docker中安装Ubuntu容器,然后在这个Ubuntu容器中再安装Docker。或许这样可以省下买服务器的钱,当然这只是为了学习测试使用,真正项目上还是需要买服务器…

    技术杂谈 2023年7月10日
    078
  • 告别输入密码,SSH记住密码和设置别名

    SSH记住密码是一件十分简单的事情,只是互联网上很多文章都误导了大家。下面这些命令有很多的option,想要了解更多的可以去Google查找。 在终端运行如下命令进行ssh的秘钥生…

    技术杂谈 2023年6月21日
    095
  • Array.prototype.reduce()

    Array.prototype.reduce() reduce() 方法对数组中的每个元素按序执行一个由您提供的 reducer 函数,每一次运行 reducer 会将先前元素的计…

    技术杂谈 2023年6月1日
    088
  • mac iterm2配置ssh自动登陆

    下载并安装好iterm2 配置过程: https://blog.csdn.net/hu_feng903/article/details/104077950 https://www….

    技术杂谈 2023年5月31日
    068
  • MySQL8.0新特性—窗口函数

    窗口函数(window functions)是一种对结果集进行计算,并将计算结果合并到结果集上返回多行的一类函数。MySQL8开始支持窗口函数,包括RANK()、LAG()和NTI…

    技术杂谈 2023年7月24日
    056
  • 利用递归实现链表的排序(归并排序)

    利用递归实现链表的排序(归并排序) 利用归并排序,我们可以将时间复杂度降至 O(nlogn), 并且我们是对链表进行排序,可以通过修改引用来更改节点顺序,无需像数组一样开辟而外的空…

    技术杂谈 2023年7月25日
    072
  • 2.数据及其预处理

    数据样本矩阵 一般数据集的构造形式: 一行一样本,一列一特征,以下为一个示例 姓名 年龄 性别 工作经验 月薪 A 22 男 2 5000 B 23 女 3 6000 C 25 男…

    技术杂谈 2023年7月10日
    061
  • MySql主要性能指标说明

    在项目当中数据库一般都会成为主要的性能与负载瓶颈,那么针对数据库各项性能指标的监控与对应的优化是开发与运维人员需要面对的主要工作,而且这部分的工作会贯穿项目从开发到运行的整个周期里…

    技术杂谈 2023年7月25日
    056
  • ssm整合后的使用

    <!– 添加分页插件的依赖包 –> <dependency> <groupid>com.github.pagehelper</grou…

    技术杂谈 2023年7月25日
    084
  • 高效能研发体系构建概论【原创】

    背景 技术管理者(技术总监/经理/CTO)都会面临公司战略执行,公司业绩的压力,以及业务对技术团队支撑能力的期望和诉求。如何打造一支快速响应,高效能,能打硬仗的技术团队?是技术管理…

    技术杂谈 2023年7月23日
    075
  • 自定义TREEVIEWUL无限极嵌套

    背景:做一个多级图片分类管理,当然要用到TreeView,在asp.net中已经提供了此服务器控件,参照效果,自定义一个简单可控性高的就当做练手吧! 效果:如图,小图标 折叠 展开…

    技术杂谈 2023年7月23日
    087
  • 面试常考算法题之并查集问题

    朋友圈问题 现在有 105个用户,编号为 1- 105。已知有 m 对关系,每一对关系给你两个数 x 和 y ,代表编号为 x 的用户和编号为 y 的用户是在一个圈子中,例如: A…

    技术杂谈 2023年7月25日
    062
  • 聊一聊 HBase 是如何写入数据的?

    hi,大家好,我是大D。今天继续了解下 HBase 是如何写入数据的,然后再讲解一下一个比较经典的面试题。 Region Server 寻址 写 Hlog 写 MemStore 并…

    技术杂谈 2023年7月25日
    068
  • 一本软考教材,治好了我多年的低血压

    事情是这样的,最近想要考一个高级软件资格证书,于是二话不说买了”信息系统项目管理师”相关资料就开始学起来了。教材一到手,刚翻开第一页读了个序言,曾经熟悉的味…

    技术杂谈 2023年7月11日
    065
亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球