Dashboard > Atlassian Plugins > ... > Macros > report-link
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  report-link

Added by david , last edited by David Peterson on Feb 27, 2007  (view change)
Labels: 

{report-link}

Plugin: Reporting Plugin

Displays the specified key value as a link.

Description

It is assumed that the item/key value is an absolute or server-relative link. If not, the 'prefix' and 'postfix' parameters can be used to prepend or append extra values to the URL.

Usage

{report-link:prefix:key|info=Mouse-over information|target=_blank}Link text{report-link}

Parameters

Name Required Default Description
[default]/key
The key chain value to use as the link URL.
info
The text which will be displayed when the user hovers their mouse over the link.
target
The target frame to open the link in. May be any standard HTML target.
prefix
The text to prepend to the item/key value in the link.
postfix
The item to append to the item/key value in the link.
trim
true
If set to 'false', the URL will not be trimmed.

Examples

Link to parent

This will create a link to the current page's parent page, if it has one.

{report-link:content:parent > content:url|default=_This page has no parent._}View parent page{report-link}

See Also

Looks like the info value can't be a keychain... bummah.  Would've been perfect to put the excerpt field in there.

Also, the info value is put into an alt attribute of the link.  This is not correct, is it?  The standard says to use title, I think... at any rate, Firefox doesn't display it.

Yeah, you are correct on both counts. Although I'm not certain it would be safe to allow arbitrary text into HTML attributes - I am not certain that new-line characters are legal, for instance. I think you'd get away with it though.

If you could create a feature/bug report we'll work on getting it into a future version (hopefully the next version). In general, suggestions made in comments get lost in the mix. Thanks!

Thanks for the (quick!) confirmation, David; you are one busy little bee these days!  That's good, I think...

I've done as you requested, filing two issues, since one is a bug and the other a feature request:

  • REPOR-94 is a bug report re: the alt-vs-title issue
  • REPOR-95 is a feature request for allowing a keychain in the info parameter

As to the character restrictions, I'm sure you're right, especially about newlines. Of course, that's what the link-encoding routines are for, n'est-ce pas?

I have a Scaffolding template for meeting notes including action items that works well now. The basic report to pull action items out of the correct area works, but I can't figure out how, as I loop through the pages and then through the action items on each page, to link to the page for each action item correctly. The non-linking report looks like this:

{report-table}

{content-reporter:space=@self|scope=Vendor Integration > descendants|labels=action_items}
{expand-on:data:mn_action_items|as=action_item}
{text-sort:action_item:mn_action_item_status|order=descending}
{expand-on}
{content-reporter}

{report-column:title=Meeting Date}{report-info:expanded:item > data:mn_date | format=dd-MMM-yyyy}{report-column}
{report-column:title=Status}{report-info:expanded:action_item > mn_action_item_status}{report-column}
{report-column:title=Action Item}{report-info:expanded:action_item > mn_action_item}{report-column}
{report-column:title=Assigned To}{report-info:expanded:action_item > mn_action_assigned}{report-column}
{report-column:title=Due Date}{report-info:expanded:action_item > mn_action_item_due_date|format=dd-MMM-yyyy}{report-column}

{report-table}

I tried adding link=true to the report-info for the Meeting Date, but the date then didn't appear in the report. Adding a report-link around that report-item also failed, perhaps because I didn't have the correct keychain? I was guessing.

Thanks for any pointers.

BTW, sorry to be asking multiple questions re the same report. I keep running into problems and I think it's because the concept of the keychain and what to use when, especially when you get into the context of table data, is murky. I haven't found any good basic documentation. The Macros documentation seems to deal with particular macros rather than covering higher-level background materials, so the rather terse documentation for each macro is hard to make sense of. Is there a good Intro to Macros Concepts page?

Hi Dennis,

To have the 'Meeting Date' column link to the original page for the meeting, you need to create the link in the context of that meeting page. In this case, since you're using {expand-on} that is the 'expanded:item', which always refers to the thing which is being expanded on. As such, try this for your 'mn_date' column:

{report-column:title=Meeting Date}{report-link:expanded:item > content:url}{report-info:expanded:item > data:mn_date|format=dd-MMM-yyyy}{report-link}{report-column}

With regards to the documentation, I agree, it's a bit scattershot. One place to look is the Recipe Book, particularly the step-by-step instructions, but that will only get you so far. The 'Macros' tab on the Reporting Plugin page has a brief overview of typical report structure. Another useful page for getting a handle on key chains is the Suppliers page, which links to pages describing each of the 'prefix:key value' options (eg. 'content:url') and has a short explanation of keys and key chains in general. Looking through the various supplier descriptions will give you a bit of an idea of what other options there are too.

Updating the documentation is definitely on the todo list, but it's a fair way down unfortunately. Until then, feel free to keep asking questions. Feel free to email me directly also if you wish.

Hi,

I'd really like to have additional options in the report-link macro, like a popup parameter and its options, so that you can report on pages and show their clickable attachments. (link-window could do it if there was a way to embed macros into each other).

Thanks a lot for your help,
Vincent

I hate to sound like a broken record, but the best way really is to create a feature request. All development is driven from JIRA and all issues are reviewed when we do any work on a given plugin to see if it will fit into the next release.

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators