Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using variables with CSV Plugin

Patrick Toy December 17, 2012

I'm not sure if this is possible, however I would like to use a variable to store the filepath name of the CSV file being rendered by the CSV plugin.

For example, I have a task set to run in which a report is generated in CSV format. The report that is generated appends the current system date in the format DD_MM_YYYY_HH_MM_A(P) to the end of the filename. I would need to be able to use the Run plugin (or something similar) to set and update a Confluence variable to match the newest filename and present the most recent report.

If this is possible, please let me know. Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted
Bob Swift
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.
December 17, 2012

Yes, you should be able to use the run or run-now macro to retrieve the $current_time and the dateFormat parameter to get a format matching your naming convention. An alternative is to write a small script (groovy) to get the most recent file in the directory. Use cache macro to improve performance.

Patrick Toy December 17, 2012

Alright, and how would such a variable be passed to the CSV plugin? Would I precede it with a '#' the same as I would with a standard filename or is there some other syntax?

Bob Swift
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.
December 17, 2012

Something like:

{run-now:dateFormat=...}
{csv:script=#filename$current_time}
{csv}
{run-now}

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events