jira-scripts's Issues
REST Ednpoint example
Hello, could you please create REST Endpoint example? Right now I do not know how to access parameters from URL. Thank you for your help.
Enhancement: sendEmail function with attachments
Hi,
as an enhancement for:
mygroovy-kit/global objects/_.groovy
This code works (I have tested it) for sending out EMails with one or more attachments (should be even robust against attachments == null):
/** Отправить email
* @param emailAddr : "[email protected]"
* @param copy - ящики которые нужно добавить в копию, указываются через запятую.
* @param subject - шаблон для заголовка сообщений.
* @param body - тело сообщения.
* @param from - адрес, который будет указан как отправитель этого сообщения. По умолчанию адрес JIRA.
* @param replyTo - адрес, на который будет отправлен ответ на письмо.
* @param emailFormat - "text/html" or "text/plain" or ...
* @param attachments - list of attachments
* */
void sendEmail(String emailAddr, String copy, String subject, String body, String from, String replyTo, String emailFormat, List<Attachment> attachments) {
Email email = new Email(emailAddr, copy, '')
email.setSubject(subject)
Multipart multipart = new MimeMultipart("mixed")
if (from) {
email.setFrom(from)
}
if (replyTo) {
email.setReplyTo(replyTo)
}
// add body
MimeBodyPart bodyPart = new MimeBodyPart()
bodyPart.setContent(body, "${emailFormat}; charset=utf-8")
multipart.addBodyPart(bodyPart)
attachments?.each {
File attachment = AttachmentUtils.getAttachmentFile(it)
MimeBodyPart attachmentPart = new MimeBodyPart()
attachmentPart.attachFile(attachment, it.getMimetype(), null)
attachmentPart.setFileName(it.getFilename())
multipart.addBodyPart(attachmentPart)
}
email.setMultipart(multipart)
email.setMimeType("multipart/mixed")
SingleMailQueueItem smqi = new SingleMailQueueItem(email)
ComponentAccessor.getMailQueue().addItem(smqi)
}
Setup required on Jira Instance
Hi Mail,
Can you please help to setup Groovy scripts on my Jira instance
Regards,
Venkata Suneel
what is the schedule in "Groovy scheduled tasks"
Enhancement for send a custom email with attachments
Hi,
as an enhancement for
mygroovy-kit/registry/function/send a custom email.groovy
This change works (and has been tested both with and without attachments):
Lines 144 and following:
if (stringEmailsTo) {
if(attachments) {
_.sendEmail(stringEmailsTo, stringCopyTo, subject, body, from, replyTo, emailFormat, attachments)
} else {
_.sendEmail(stringEmailsTo, stringCopyTo, subject, body, from, replyTo, emailFormat)
}
}
Can a Goovy text field be sortable?
I've used a Groovy text field to take a given value based on several conditions. It works like a charm but when I search in Jira I can't sort the results based on that column. Is there a solution for this?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.