How can I periodically email the Excel version of a report

katy_rotman January 17, 2012

I would like to automatically& periodically create an Excel report of one of my filters and then email it or place it on predefined shared network location.

How can I accomplish this ?

I'm using Jira v4.1.2#531

5 answers

1 accepted

2 votes
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2012

I guess that the subscription filter is not suffient as you need the Excel format itself.

I think this is not possible from Jira. A simple cronjob on the server you expect it to be stored which does a wget of the Excel url for your filter should do the trick. If the project has Anonymous access you need not provide any authentication. Else the Url should include os_username and os_password in Url so that the Jira knows who is trying to access the Url.

Also do remember to increase the tempMax to whatever value you need (in case of filters returning a long list of issues)

Does this help?

Sample Url

https://<<servername>>/sr/jira.issueviews:searchrequest-excel-current-fields/<<filterid>>/SearchRequest-<<filterid>>.xls?tempMax=5000

katy_rotman January 18, 2012

Thank you ! A bit after submitting the question I've stumbles upon the wget idea, now just trying to make it owrk. As my problem seems to be authentication, could you please specify where/how in the url should I place the username/pasword?

Again, thanks a lot!

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2012
Bhartendu Gupta January 8, 2019

The above is working fine but it is storing the file to the default system location, can we specify the location in the URL where we want the excel to be stored ?

Like Chris_Ross likes this
2 votes
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2015

It is now possible! Use the Excel Automation Plugin.

It supports both use case you mentioned:

  • It can email the Excel file to a list of email addresses.
  • It can also save that to the filesystem, to a generated dynamic path (so that one export will not necessarily overwrite the previous one).

Read the JIRA XLS automation tutorial for a detailed how-to.

 

1 vote
K_ Yamamoto
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 25, 2019

I found the answers are for Jira Server. So I'll post a sample request for Jira Cloud.

#!/bin/bash
# Usage:
# 1. Issue your API Token at https://id.atlassian.com/manage/api-tokens
# 2. Run the command like below:
# chmod u+x ./snippet.sh
# bash ./snippet.sh

HOST="example.atlassian.net"
USER="sample@example.com"
API_TOKEN="__YOUR_TOKEN__"
FILTER_ID="10106"

curl -L --request GET \
--user "${USER}:${API_TOKEN}" \
--url "https://${HOST}/sr/jira.issueviews:searchrequest-csv-current-fields/${FILTER_ID}/SearchRequest-${FILTER_ID}.xls?tempMax=1000"
Besides, however, you probably want to look into Jira Cloud for Sheets as well if you are interested in Jira-to-spreadsheet integration.
1 vote
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2014

If Excel as file format is not a strict requirement, you can export your filters to PDF and send those in emails periodally using the PDF Automation Plugin.

You can export filters to PDF files and copy those to file system paths as written in this guide (which relies on the PDF View Plugin's PDF API and some integration scripts written in Groovy).

The first option is the simpler to use if that meets your requirements. The second is 100% programmable, so your possibilities are endless.

0 votes
hrzadnn September 14, 2014

@Katy Rotman did it work??

@Renjith Pillai this page is dead http://confluence.atlassian.com/display/JIRACOM/Automating+JIRA+operations+via+wget could you please give us another link? Thank you!!

 

Suggest an answer

Log in or Sign up to answer