Execute filter and email from scheduled task

Hi all,

I'm trying to write a scheduled task in JIRA, along the lines of http://www.j-tricks.com/1/post/2011/05/scheduled-tasks-in-jira.html

My aim is to execute a filter and then email the assignee/reporter/group member for each issue.

I've looked at https://answers.atlassian.com/questions/190042/executing-a-filter-within-a-jira-plugin and https://answers.atlassian.com/questions/15723/how-to-send-email-from-plugin, which should give me the basics I need.

My question is: where do I (or can I) download the jars required to use the classes (MailQueueItem , JqlClauseBuilder , ComponentAccessor, etc).

Thanks

3 answers

1 accepted

This widget could not be displayed.

You will have to add the following dependencies in the pom.xml

<dependency>
      <groupId>com.atlassian.jira</groupId>
      <artifactId>jira-api</artifactId>
      <version>${jira.version}</version>
      <scope>provided</scope>
    </dependency>
<dependency>
      <groupId>com.atlassian.jira</groupId>
      <artifactId>jira-core</artifactId>
      <version>${jira.version}</version>
      <scope>provided</scope>
    </dependency>

jira-core has classes which might change in minor versions but MailQueueItem comes from that if I remember correctly.

This widget could not be displayed.

Hi,

You can do it , using JJUPIN (http://confluence.kepler-rominfo.com/dashboard.action) Plugin or JSS plugin (Jira Scripting Suite).

This widget could not be displayed.

Unless this is a programming practice for you (in which case good luck, Jobin already gave the correct answer!), you can save some efforts by installing the Automation Plugin with the PDF Automation Plugin to your JIRA.

The Automation Plugin allows you to set up a CRON based trigger that executes an action according to the specified schedule, whereas the PDF Automation Plugin provides a Send PDF action that executes a saved filter, generates a PDF document from the result, attached that to an email and sends the email to the email addresses you specify.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 6 hours ago in Europe

ABUG-20 Livestream: The 20th Atlassian Belgian User Group (including a Summit 2018 Recap)

You can't/couldn't make it to our User Group today? Don't worry, we'll be live streaming and recording the event for your sake. Comments, questions, basically any reactions can be posted below! New...

35 views 0 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you