I want to export a Jira view page to Excel file.
This page is basically a view page from project tab panel plugin i have made. And on clicking a button in the , the entire view page content will be export to a downloadable excel file.
There's a basic "export to Word" already built into Jira, and the issue navigator has "export to Excel" in it too.
For a quick answer, with no coding, you could simply run a filter for "Key = ABC-123" which will give you a single line in the issue navigator. Click "export to excel", and you'll get a spreadsheet file out.
I suspect you could re-use some of Jira's API to do the formatting the built-in export is doing, or maybe some of the code.
But... I'd question the use for this - is it really worth having an Excel export of a single issue? What's the use case? The usual use for a spreadsheet is for lots of lines of data, not just one line, and the issue navigator already supports that.
@Nic: Please read my question again , i m not talking about any issue navigator
cant understand below statement with my context.
"But... I'd question the use for this - is it really worth having an Excel export of a single issue? What's the use case? The usual use for a spreadsheet is for lots of lines of data, not just one line, and the issue navigator already supports that."
I have read the question. You appear to want to export a single issue to Excel.
I'm questioning the usefulness of this because I cannot imagine any use for it (I don't have a good imagination, so I'm curious to learn). I can see lots of use for a spreadsheet containing many lines of issues, which is what the issue navigator has already. I guess my question really is "why are you trying to export a single issue into a format that is explicitly designed to handle masses of data"
I've also pointed out that there is a way to export to excel without you needing to do any code, it's just not on the issue view. You could actually construct a url that would do it without any coding as well.
Also Jira already probably has a lot of the code in it you might be able to reuse, but we can't really point you at that unless we know roughly what the output you are aiming for is. (Which leads us back to "you really want to export one single line?")
@Nic, @Daniel: I havent mentioned that i want to export issues into excel and sorry if I m not clear with my context earlier.
Now in detail :
I have created a project tab panel plugin 'estimation' which is visible inside the browse project section .
Here , the tab panel have a tabular view of story points totals.
I just simply want to export this data to a excel , that's why I want to know if Jira has any API for it.
So you don't want to export the issue at all.
You want to export some information that you have extracted/calculated and displayed on the issue. That makes a lot more sense, now you've told us what you actually want ( assuming the data is broadly tabular)
I'd approach this in a similar way to the issue navigator handling excel exports of issue lists - that adds a link which goes to a servlet which pushes issue data through a .vm file to format it in an xml shape that a spreadsheet can understand.
I'd simply take a look at how the Jira excel vm is written - you should be able to see how $values are piped into there and wrapped in the relevant tags. (I don't think there's much API you can reuse - the navigator export is exporting issues so it needs to loop through a list of issues and their fields, but you've already got your data in your view tab, so you can reuse that)
It's got Excel related API calls, but they are aimed at exporting fields from a list of issues, so I don't think they are going to help you much, as you've already got the data.
If you have a look at https://developer.atlassian.com/static/javadoc/jira/6.1/reference/com/atlassian/jira/issue/views/AbstractSearchRequestExcelView.htmlfor example, you'll see what I mean. (Also, use the "search" box to find more excel related API calls)
I think that you can develop an issue-view plugin or an issue operation plugin using a template file velocity (.vm). Or if you have a complicated export you can use an external library.
In our company, we have have developped an export word file plugin as an issue operation plugin using an external library xdocreport.
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
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!
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