Directly open attachments via reporting plugin
Hi there,
I am using the following markup to report on the attachments of a table-data row on a page page:
{report-table}
{expanding-reporter:data:projectinitiation|as=table}
{local-reporter:@self}
{text-filter:data:findingsinitiation|required=true}
{expanding-reporter}
{report-header}
{table:name=lessonslearnedinitiation|width=100%|style=padding:0 0 0 10px;|class=confluenceTable}
{tr}{th:colspan=4|class=confluenceTh}Project Initiation{th}{tr}
{table}
{report-header}
{report-column:title=Findings|width=80%}{report-info:expanded:table > data:findingsinitiation}{report-column}
{report-column:title=Attachment|width=10%}{report-info:expanded:table > data:attachedinitiation|link=true}{report-column}
{report-column:title=Status|width=10%}{report-info:expanded:table > data:statusinitiation}{report-column}
{report-empty}{report-empty}
{report-table}
However the construction above does not allow for me to get an open dialog for the respective attachment directly it just sends me to the attachment page. This is for our current needs not sufficient.
I have read something about storing something as references and getting a download link direktly, but am stuck at the moment.
any help would be greatly appreciated.
Cheers,
Robert
I am using the following markup to report on the attachments of a table-data row on a page page:
{report-table}
{expanding-reporter:data:projectinitiation|as=table}
{local-reporter:@self}
{text-filter:data:findingsinitiation|required=true}
{expanding-reporter}
{report-header}
{table:name=lessonslearnedinitiation|width=100%|style=padding:0 0 0 10px;|class=confluenceTable}
{tr}{th:colspan=4|class=confluenceTh}Project Initiation{th}{tr}
{table}
{report-header}
{report-column:title=Findings|width=80%}{report-info:expanded:table > data:findingsinitiation}{report-column}
{report-column:title=Attachment|width=10%}{report-info:expanded:table > data:attachedinitiation|link=true}{report-column}
{report-column:title=Status|width=10%}{report-info:expanded:table > data:statusinitiation}{report-column}
{report-empty}{report-empty}
{report-table}
However the construction above does not allow for me to get an open dialog for the respective attachment directly it just sends me to the attachment page. This is for our current needs not sufficient.
I have read something about storing something as references and getting a download link direktly, but am stuck at the moment.
any help would be greatly appreciated.
Cheers,
Robert
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Hi Robert,
In Scaffolding/Reporting 3.2.0, this should work as you expect, because we changed the default location to the file, not the attachments page.
However, for this version, you'll have to use the {report-link} macro, something like this:
{report-on:expanded:table > data:attachedinitiation > reference:value}{report-link:attachment:url}{report-info:attachment:file name}{report-link}{report-on}
The surrounding {report-on} just saves us from having to do that whole key chain twice. -
Hi David,
good to hear from you. I will try your suggestion.
At the moment we have downloaded the new version of the reporting macro. However we are facing a problem, that the link does not work via the new macro.
Suppose our confluence instance is under the webapps path confluence/ then the reporting plug in generates a download link, that conatins a application path 'confluence/' to much, e.g.
http://server/confluence/confluence
so the download link does not work and we get the message 'page does not exist'.
Could you point out how the reporting plug in renders the link and where it gets the path information from and how I could correct this setting?
Best,
Robert -
Inappropriate?Hmm. There was a similar problem with pages, and I thought it had been resolved in 3.2.0. Perhaps attachments got missed somehow.
Could you create a bug report and I'll schedule it to get investigated in the next bugfix release. -
Inappropriate?Hi David,
I will file a bug report. For now your initial hint works well and will get us over the time until the next bug fix.
Best,
Robert
Loading Profile...



EMPLOYEE