Availability

Child pages
  • Run Self-Service Reports for Confluence

Skip to end of metadata
Go to start of metadata

Description

Dynamic content based on user-provided input using a form. The form is automatically constructed from the macro parameters. Upon clicking a button, variables are substituted into the macro body and then the macro body is rendered.

Features

  1. Simple, text based definition of form via macro parameters.
  2. Many different input field types
    • text 
    • textarea
    • radio button
    • checkbox
    • select
    • select-multi - multiple value select
    • integer
    • integer-select - automatically generated integer choices
    • float
    • date
    • output - display only
    • hidden
    • group - UI control
  3. Options highly customizable
    • Values can be different from display text
    • rows or entries per row can be specified
    • fields can be made required
    • integer, float, and date value validation with range checking
    • group multiple fields on a line
    • disable field
  4. More support - less important fields (rows) can be hidden initially until user requests to see them
  5. Help support - automatic linking to a help page with anchors
  6. Customizable button text and other text fields
  7. Pre-defined variables
  8. URL links to page with variable request parameters
  9. Snapshot/archive support - the ability to save an attachment that is a snapshot of render macro body at a point in time
  10. Macro can be controlled by Macro Security for Confluence
  11. Advanced customization support for request parameters and parameter input (velocity)

Related Add-ons

Macro Security for Confluence

  • Option to control use.

More Information

Marketplace

  • Downloads
  • Compatibility
  • Pricing

User's Guide

Gallery

 


 

Initial display

Expanded display

89 Comments

  1. Hello,

    A really nice plugin here!

    I was wondering if it is possible to use in conjonction the run plugin and scaffold plugin.

    The goal here is to create a nice formular with the run macro and then store the choice value selected in scaffold field.

    Until now, i cant make it work because Scaffold only store the reference value "$xxx".

    Thanks for your help.

    Michael

    1. Post a simple example of what you are trying to do.

      1. Hi Bob, i should have start with this:

        here is the simple code:

        {run:replace=gender::Gender:radio-required:-1:M:Male:F:Female}
        
        {text-data:gender}$gender{text-data}
        
        {run}
        
        display the value inject by run macro
        {get-data:name=gender}
        

        The deal here is to intercept the value injected. I was hoping this would work, but the scaffold dont seem to execute inside a run macro.
        is there a way to do this. Maybe you have another solution?

        1. Thanks for the example. This works for me (smile). I get the selected value (M or F) from the get-data macro. I tested on Conf 3.1 with scaffold 3.3.1.

          1. i'm glad it worked for you. Here is my display:
            F

            $gender
            display the value inject by run macro
            $gender.

            I'm using Conf 3.2 and Scaffold 3.3.1.

            Seems a bug with 3.2?

  2. Unknown User (randyjames)

    Hi, I'm trying to replace multiple variables with a single variable choice.

    For example,

    You have a selection between A or B, depending on that choice, you set 3 variables.

    Choice

    Var_1

    Var_2

    Var_3

    A

    100

    Aaron

    Seattle

    B

    200

    Bob

    Nyc

    Hi $Var_2 from $Var_3 you are number $Var_1.

    Hi Aaron from Seattle you are number 100.
    Hi Bog from Nyc you are number 200.

    I've read the documentation and can't seem to figure out how to tail additional variables onto a choice. Maybe it's not possible with this macro ?

      1. not possible with current support
      2. you can use a simple groovy script driven by the run plugin to have multiple variables
      3. if you are using this for a SQL query, then just use SQL techniques like a case statement to convert the value into different values
  3. Hi,

    I am trying to do the following {run:replace=finance:::checkbox:{my_macro:docname}:finance_doc}. I tried to mask the {} with \\x7B (file://\\x7B) and \\x7D (file://\\x7D) but then still the : exists and makes trouble. ;-)

    Is there a way to make the above value work?

    Thanks

    1. Look into the replace-and-render macro to help with this.

  4. Unknown User (jbrown2197)

    I am trying to use this with a SQL field that is bit data type. I keep getting a SQL error message that varchar isn't an acceptable data type. Is there a way to force the data type for items in the run macro?

    1. This is an sql question. Open an support issue for the sql plugin and provide enough detail so I can help.

  5. Hi there,

    This must be a silly question, but i hadnt find the answer:

    how to run a page with an autorun=true parameter base on a default value???

    I have a select with a dozen of option, but I dont know how to trigger by default one of the choice?

    Thanks for help.

    Michael

    1. {run:autorun=true|replace=s1:value1:Select:select::value1::value2} 
      {sql-query:datasource=testDS}
      select * from test01 where a1 = '$s1'
      {sql-query}
      {run}
      
      1. it doesnt work.

        what am I doing wrong?

        {run:autorun=true|titleRun=Exécuter la macro avec la valeur souhaitée|replace=report:AppServ:Sélectionner la valeur:select:Equipelog:Equipe:AppServ:Serveur:AppApp:Application:dateouverture:Date:acteur:Intervenant:typeEvenement:Type}
        
        
        1. oups my fault. It's working. I had another run in the same page......

          Thanks...

          Michael

          1. well on second thought, it's not working like i would.

            Normaly it should render in autorun and replace the default value. Well it does so only if I dont have textual replacement for choices.

            If i remove the "Equipe", "Serveur", "Application", etc... and replace with ":", it's working...

            1. You are just missing a colon - select:Equipelog should be select::Equipelog

        2. I not sure what you mean by "it doesn't work". Do you have something like the following after your markup?

          $report
          {run} 
          

          Next, you can replace $report with an appropriately constructed sql macro with the sql statement doing something with the $report value.

          1. Hi Bob,
            I'm not using sql query but reporting to display a report-table.

            Here is the code

            {run:autorun=true|titleRun=Exécuter la macro avec la valeur souhaitée|replace=report:AppServ:Sélectionner la valeur:select:Equipe:Equipelog:Serveur:AppServ:Application:AppApp:Date:dateouverture:Auteur:acteur:Type:typeEvenement}
            {report-table}
            {local-reporter:content:descendents}
            {text-filter:content:title|include=.*LOGBOOK-.*}
            {text-filter:data:$report|minLength=3}{text-sort:data:$report|order=ascending}
            {local-reporter}
            
            ....
            
            
            {run}
            

            The value Equipelog, AppServ, etc.. are scaffold fields. I want to replace the choice value with other text like Equipe, Serveur, etc...
            If I only use select::Equiplog::AppServer, etc... it's working....

            Thanks.
            Michael

  6. I can't get any of the different types to replace the default text box.  I've tried every version of this I could think of:

    {run:autorun=true\|heading=Label\|titleRun=Submit\|replace=label1:Label:Label::select-multi:label1:label1:label2:label2:label3:label3:label4:label4}

    - various combinations of single colons, double colons, fewer parameters, more parameters, different pairs (label1:label1:lablel2:label2,etc.). I've also tried copying and pasting some of the examples above but I always end up with the straight text box. I'm using Confluence 2.10.4 with Run 1.1.0.

    thanks for you help,

    Joe

    1. All the new function documented here is for RUN 2.0 and above (you would have to go into the page history for older documentation).

  7. Hi Bob,

    I'm doing some tests with your run macro in Confluence. Most of it runs very nicely, especially in combination with your SQL macro. Great stuff!

    One thing however, I can't get to work (sad)

    I gathered it should be possible to pass variables from one 'run macro' to another. I would like to be able to declare variables at the beginning of my page, which I then can use throughout the page in separate instances of a 'run macro'.

    I've tried a lot of different settings but in none of them work. The idea behind it is as follows. A wikipage start with the red run-now in wich the variables are declared. After which the run-now is closed. Further down the page, newe instances of run will be run, using the vars from the red run-now.

    {run-now id1 }
    (setup key1 = X,key2 = Y, key3 = Z)
    {run-now}

    {run id2}
    use $key1 and $key2 which are setup in run-now id1
    {run}

    {run id3}
    use $key3 and $key1 which are setup in run-now id1
    {run}
    ....

    Thanks in advance for your help.

    1. You already know the answer from our emails, but thanks for posting so others may benefit (smile). The key thing to understand is that the variable replacements only occur within the body (and parameters (smile)) of the run macro and are not available outside of that. Note that when you nest macros, you will need a variant of the macro like run-now in this example or the duplicate macros like run2, run3.

      {run-now:replace=key1:x,key2:y,key3:z}
      
      {run}
        Use $key1, $key2
      {run}
      
      {run}
       Use $key3, $key1
      {run}
      
      {run-now}
      
  8. We are having an issues with the display format of Uptime on the admin/systeminfo.action page with this plugin enabled.
     - Normal view (plugin disabled): 2 days, 18 hours, 35 minutes, 16 seconds
     - Skewed view (plugin enabled): 2 , 18 , 35 , 16
    Has anyone else noticed this problem or have a fix for it?
    Environment: Confluence 3.4.9 - Windows Server 2008 R2 6.1 - Apache Tomcat/6.0.32 - 1.6.0_17 - 14.3-b01 - Java HotSpot(TM) 64-Bit Server VM - MySQL 5.1.51-community - com.mysql.jdbc.Driver - mysql-connector-java-5.1.11

  9. And as of upgrading DEV to v3.5, the Uptime is displayed correctly (even with the plugin enabled)

  10. Unknown User (djdube)

    Hi Bob,

    Is it possible to integrate the reporting macro (specifically report-variable) with the run-now macro? I have several projects that each consist of a series of wikis. I was thinking it would be nice to substitute per project specific variables when importing file or even reporting. For kicks I tried a vary simple case where the report-variable is hardcoded.

    {report-variable:Development Project|value=BSS}
    
    {run-now:autorun=true|replace=development_project:{report-info:variable:Development Project}}
    
    This is the selected $development_project project
    

    The above is not working for me... and I'm assuming it's because the run-now is executed first before report-variable can get assigned. Even if I embed the report-variable action in a separate run, would the report-info macro above work as desired?

  11. Unknown User (center_gravity)

    Hi

    is the latest version compatible with 3.5 ?

    Thanks!

    1. Yes, Plugin Exchange has been updated. I will update the page.

  12. Unknown User (hahler)

    Hey Bob

    Is it possible to avoid the single quotes from multiple selections? We use the run plugin to predefine labels before creating a page. This works fine beside the fact that when we allow multiple selection for a category the labels gets single quoted. E.g. we have a checkbox sales area with the values Automotive, Aviation and Industry. The result of the run macro after replacing is like you mentioned in your documentation a single quoted, coma separated list. Is there anyway to get rid of the single quotes? I tried looking at the replace and render macro but it seems not useful in this case. In Foswiki we had a FORMAT macro which allowed us to get rid of unwanted special characters by simply replacing them. Do you have any idea of how this could get done?

    Best regards,

    Paul

    1. Does RUN-45 resolve your problem - ie suppressQuote=true?

      1. Unknown User (hahler)

        Yeah thanks. That was exactly what I was looking for. Pity that I didn't found it via Google.

  13. Unknown User (peter james)

    I am trying to use the Run macro in conjunction with the {add-page} and {macro-security} macros to create a page using a template
    The code I use is:

    {run:id=addpage|replace=code::Project Identifier:text-required,date::Reverse Date:text-required|showReset=true|titleRun=Activate|requestAction=run_addpage}
    {add-page:name=$code $date|template=Template1|parent=@self|live=true|labels=prj,$code,$date}Click to add new page{add-page}
    {run}
    

    An edit page restriction is set to the pg-edit group which has edit access to the run macro.
    This works well - except that the user activating the plugin must belong to the pg-edit group in order to activate the {add-page} macro. (The add-page macro appears to be obeying the edit page restrictions).
    Is there any way of activating the {add-page} macro from the {run} macro, so that when the user has entered the data and pressed the Activate button, besides rendering the {add-page} macro it also runs it?

    Regards,
    Peter

      1. Unknown User (peter james)

        Thanks Bob,

        That works beautifully - it opens up a lot of functionality very easily.

        Regards,

        Peter

  14. Unknown User (hahler)

    Hey Bob,

    I have two pretty cool features in mind which would make your run plugin even more powerful. I was thinking about two extra parameter which can be solved with java script easily.

    1. focus: When opening a page and focus set to true there is no need to click in the run field to start typing. You can just start typing right away. Perfect for phone lists etc.

    2. key on event with timeout: Useful in connection with an sql database. When set to true the run plugin starts handing over the parameter while typing. Also pretty handsome for creating a phone list app.

    If you have other ideas on how to get that working let me know. Maybe there is already an option like that especially the focus function seems pretty useful from my point of view.

    1. Thanks for the suggestions (smile)! Can you please create an issue for each one? Provide more details for 2. specifically.

  15. Hi Bob, this might sound like an odd request, but would you consider making the run_ prefix changeable/optional?

    I found you can now easily embed flash media. I have some flash that post data back to the wiki page, but I can't change the flash post variables (and they don't begin with run_ so I'm out of luck here).

  16. Unknown User (hahler)

    Hey Bob,

    just came across another issue that I haven't been able to solve... When I use a drop down list of values and those values include a comma, the plugin interprets the comma as a separation of replace parameters.

    Neither escaping via "\" nor putting the affected values in ' ' seems to work. Escaping has no effect at all, and using single quotes causes the plugin to show the values correctly, but they don't seem to match the scaffolding values anymore, so there are no search results.

    Any idea?

    1. Quoting is the solution (escaping will not work). Example: x:1:'It''s an example: 1, 2, or 3'. If something like this does not work, open an issue with the specifics.

  17. Bob,

    The select-multi has correctly allowed me to enable the selection of many items from a drop down list. On revisiting a page I now find that I have selected too many items. It some cases I wish to remove all my selections. How does select-multi enable the clicking on selections to remove them?  I can get down to one selection then I'm stuck.

    Thanks

    1. Hmmm, I don't think there is a way to do this. Normally, use a None option or equivalent to indicated no selection.

  18. Ever so wonderful Mr. Bob,

    I'm trying to write a date range and am having difficulty getting the parameters to fit in. I've used integer-select to get 1 through 12, but would like to use the date type to display the month names. Is this possible?

    What I have now:

    month:1:Month:integer-select:1:12
    

    What I would like to work:

    month:1:Month:date:1:12:M
    

    You're the best Bob!

    1. Thanks (smile). If you need values different from the text displayed, use select with 1:Jan:2:Feb:3:Mar etc...

      1. Just to clarify, there is no way to use dateFormat and a date range to get a list of months?

  19. Disregard, figured it out. Working code is below:

    {run:autoRun=true|titleRun=Submit|replace=month:2011-07:Select Report Period:select::2011-07:July 2011:2011-06:June 2011:2011-05:May 2011}

    Original Post:

    Sorry to ruin your Friday. We're trying to autorun a page with the default date here, but it does not render it that way. When we initially load the page, it does not replace the $month variable. Once we run the macro manually, it replaces the $month variable. Any help is appreciated.

    {run:autorun=true|titleRun=Submit|replace=
    month::Select Report Period:select:2011-07:2011-07:July 2011:2011-06:June 2011:2011-05:May 2011}
  20. Unknown User (adam.fiebig)

    Hi Bob, I was wondering if there was any kind of update available on when the Run Plugin 2.2.0 was going to have a release version. We've been using the Beta version in out testing environment, but we need a release for any production use. Thanks!

    1. Haven't received much feedback on the new capabilities, so was not aware of much usage. So don't have any further changes. I can turn it into a release once I get some documentation updated.

      1. Unknown User (adam.fiebig)

        Yeah one of our teams is looking to use it for the newly added "Run Operations on Lists of Data". I could ask him to send me some feedback/more specifics from his experiences if you wish: I'm merely the confluence admin :-) But it's been stable in our testing environment thus far

  21. Something i'd like to be able to do, that i don't seem to be able to do:

    Have a report on a page (with run plugin substitutions), have that autorun on page load and  have the substitution options and a "run" button available.

    Here's where i'm at so far:

    {run:autorun=true|replace=
    Select:::group,
    year::KFC Year:select::'2007-08,2008-09,2009-10,2010-11,2011-12':All Years:+2007-08:2007-08:+2008-09:2008-09:+2009-10:2009-10:+2010-11:2010-11,
    window::Window:select::'w1,w2,w3,w5,w5,w6,w7,w8,w9':All Windows:+w1:w1:+w2:w2:+w3:w3:+w4:w4:+w5:w5:+w6:w6:+w7:w7:+w8:w8:+w9:w9,
    type::Job Type:select::'le,he,dessert,drink,breakfast':All Types:+le:le:+he:he:+drink:drink:+dessert:dessert:+breakfast:breakfast,
    region::Region:select-end::'nat,test,osd,other':All Regions:+nat:nat:+test:test:+osd:osd:+other:other|titleRun=Go}
    
    {report-list:class=gallerylist|style=none}
    {local-reporter:page:children|source=All KFC Projects}
    {text-sort:data:kfcpromoname|mode=natural}
    {content-filter:labels=$year,$type,$region,$window}
    {local-reporter}
    {report-body}
    {report-link:content:url}{report-on:content:images}{report-image:attachment:thumbnail path|border=1px solid black}{report-on}
    {report-info:data:kfcpromoname}{report-link}
    {report-info:data:kfcjobnumber} {report-info:data:kfcpromostoredate|format=MMM yy}
    {report-body}
    {report-list}
    {run}
    

    Page loads, i can trigger the report-list with the go button but it doesn't autorun.

    Ideas and suggestions welcome (smile)

    james

    1. worked it out, and the grouping, in case it's of any use to anyone else:

      {run:autorun=true|titleRun=Go|replace=
      Select:::group,
      year:'2007-08,2008-09,2009-10,2010-11,2011-12'::select::'2007-08,2008-09,2009-10,2010-11,2011-12':All Years:+2007-08:2007-08:+2008-09:2008-09:+2009-10:2009-10:+2010-11:2010-11,
      window:'w1,w2,w3,w5,w5,w6,w7,w8,w9'::select::'w1,w2,w3,w5,w5,w6,w7,w8,w9':All Windows:+w1:w1:+w2:w2:+w3:w3:+w4:w4:+w5:w5:+w6:w6:+w7:w7:+w8:w8:+w9:w9,
      type:'le,he,dessert,drink,breakfast'::select::'le,he,dessert,drink,breakfast':All Types:+le:le:+he:he:+drink:drink:+dessert:dessert:+breakfast:breakfast,
      region:'nat,test,osd,other'::select-end::'nat,test,osd,other':All Regions:+nat:nat:+test:test:+osd:osd:+other:other}
      
      {report-list:class=gallerylist|style=none}
      {local-reporter:page:children|source=All KFC Projects}
      {date-sort:data:kfcpromostoredate|order=descending}
      {content-filter:labels=$year,$type,$region,$window}
      {local-reporter}
      {report-body}
      {report-link:content:url}{report-on:content:images}{report-image:attachment:thumbnail path|border=1px solid black}{report-on}
      {report-info:data:kfcpromoname}{report-link}
      {report-info:data:kfcjobnumber} {report-info:data:kfcpromostoredate|format=MMM yy}
      {report-body}
      {report-list}
      {run}
  22. Hi! thanks for this great plugin!

    I've psotet a question but I've found the answer so please dleete this comment :)

    1. Yes, That is RUN-56 only available as in 2.2.0 snapshot.

      1. So it will be possible to use input variables from different run macros in particular run macro? Coulkd you please tell me the syntax which should be used? :)

        Thank you!

  23. Hi Bob

    Thanks for this plugin. We have been using it for a couple of years wrapped around the Sql macro.

    However, we have migrated/restored confluence to a new box and macro shows as missing. With other macros
    I just go and download/install from the Plugins in Atlassian Exchange.

    With Run, I can't seem to find it. Where/what name does it appear in Confluence Exchange for you?

    Cheers
    Mark

    p.s. We are running 4.1.2 of Confluence.

    1. Try now. Compatibility matrix was not updated. Remember, only compatible in wiki compatibility mode. Note that you can install via URL from download page as well.

  24. Hi Bob

    Great! Thanks for prompt response. All working now.

    Cheers
    Mark

  25. does anyone try this plugin on confluence 4.2?

  26. USER-OPTIONS IN RUN MACRO

    Is it possible to insert the user list via the {user-options:groups=confluence-users} to create a select list with the run macro?

    Ultimately I would like a drop-down with user names that I can insert into a run plugin search combined with the reporting plugin, and not have to manually update the drop-down list.

     

    I am using confluence 4.2.2 and version 4.0.1 reporter macro and version 2.1.0 run macro.

     

      1. Bob, it was great to meet you at Summit 2012 and put a face to the name!

        On this topic, is it possible to embed an SQL macro within a RUN macro to populate user choices? It didn't seem to work for me, and I couldn't find a 'macros=true' option like there is in the SQL macro. Thanks!

        1. Yes, it was good to get some personal connections going again. I plan to be a more regular attendee at summit from now on.

          Regarding your question, no. Body contents are evaluated on button press so that model does not work here. And from a performance perspective, generating the page with the selections is better than dynamically on page view.

  27. Populate Select list from table-data

    I have this run code running well and would like to populate the select::Open:Open:Closed:Closed from a table located in somespace:somepage > MyTable:Status but have not been able to work all the variables. I have been studying the previous link showing how to use reporting with no success.

    {run:autorun=false|titleRun=Submit|replace=project_status::Project Status:select::Open:Open:Closed:Closed}
    {report-list}
    {local-reporter:page:children|source=proj:Project Area}
    {text-filter:data:ProjStatus|required=true|value=$project_status|minLength=2}
    {local-reporter}
    {report-body} {report-info:data:ProjNumb|link=true}{report-info} - {report-info:content:title|link=true}{report-info} - {report-info:data:ProjMan|link=true}{report-info} {report-body} {report-list} {run}

    I really appreciate your help with this!

     
    1. Where ever the select list data is, you need something that will format it into the string required by the run macro like Option1::Option2::Option3:: . It is hard to do that without scripting of some sort. How to generate choice values using SQL does this for SQL, but you could do something similar using reporting or metadata like macros that return part of the data.

      1. Bob,

        I have worked out how to populate the run macro from a scaffolding table using reporting, table-plus and replace-and-render (whew!) Here is the code and you are welcome to add it to your "how-to" files.

        The key is using the reporting block/body which allows a custom separator, the needed :: to be inserted into the list for the run macro select list. This is surrounded by the RnR to inject the formatted list into the run macro. then of course, the reporting into the table-plus to format the search output.

        {replace-and-render}
        {replace-item:%MyList%}{report-block:separator=::}{local-reporter:data:MyDataTable|source=spacekey:PageName}{local-reporter}{report-body}{report-info:data:MyDataColumn}{report-body}{report-block}{replace-item}
        {replace-body}
        {run:autorun=false|titleRun=Submit|replace=ReplacementValue::MyTitle:select::::%MyList%:}
        {table-plus:columnTypes=F,S,S|autoNumber=true|sortColumn=1|sortIcon=true|columnAttributes=style="text-align:center;",style="text-align:center",enableHeadingAttributes=false;",style="text-align:center;"}
        	{report-table}
        		{local-reporter:page:children|source=spacekey:ParentPage}
        			{text-filter:data:Data1|required=true|value=$ReplacementValue|minLength=1}
        		{local-reporter}
        		{report-column:title=Title 1|width=40%}
        			{report-info:data:Data1|link=true}{report-info}
        		{report-column}
        		{report-empty:trim=true}_No projects of this type to report._{report-empty} 
        	 {report-table}
        {table-plus}
        {run}
        {replace-body}
        {replace-and-render}

        There are probably easier ways with SQL but this fits nicely.

        I hope this is useful to someone else.

        Thanks,

        Bill

  28. Does the run macro still have the reset button available? I have tried showReset=true|titleReset=Reset parameters with no affect. If not, any suggestions for resetting the form?

    Thanks,

    Bill

    1. Nothing has changed, showReset=true is all you need. And you can customize the name like you have indicated above. Just try {run:showReset=true}{run}

       

       

       

  29. Hi Bob,

     

    Thanks for the reply, I must have had a typo as it shows the button now. Not really sure it is working though. What should the reset function be? I have this code, when I run, results are produced. I select the reset and there is no apparent change. Is there something else I need to do to trigger the reporting to clear. My impression is the search box would clear and results empty like a fresh page load.

     

    {run:autorun=false|titleRun=Submit|showReset=true|replace=space_page::Knowledgebase Page:select::::Page1::Page2::Page3:}
    {report-table:depth=all}
    {content-reporter:spaces=Lib|scope=Lib:$space_page > descendents|types=attachment}
    {text-sort:content:title}
    {text-filter:content:title|exclude=.*.png.*,.*.gif.*,.*.jpg.*}
    {content-reporter}
    {report-column:title=File Name}
    {report-info:content:title|link=true}
    {report-column}
    {report-column:title=Comment}
    {report-info:content:comment}
    {report-column}
    {report-column:title=Size}
    {report-info:content:nice file size}
    {report-column}
    {report-empty}
    _No files have been attached to this page._
    {report-empty}
    {report-table}
    {run}

    Just a curious question, will there be a new version of this macro?

    Thanks.

    1. Bill, good. The reset button clears any input since that last time the run button was pressed or the page was entered with parameters set (look at the url). If you want to return the page to prior to its original (page) state, click on the title - that will clear all the parameters in the url. You could make an argument for a different behavior, but that is the way it works (smile). Write up an issue for anything you would like to see. There will be a release coming up in a few weeks.

  30. Is it possible to dynamically set the values for a select list? I'd like to create a select list that has all of the groups defined in a JIRA environment. Not having to hardcode this would be nice. Thanks!


  31. Hi Bob,

    we have an annoying issue, run/run-now seems to have a conflict with scaffolding and prevents it from saving if used in a certain context (I posted a simple example here: Question at Atlassian Answers). Would you take a look at this?

     

    Thanks!

    1. I saw your question. Don't have any thoughts right now. I opened RUN-101 to track.

  32. Rob

    How do I get one SQL query to feed the drop down list for the run macro that runs a different query?

  33. Hi Bob,

    We're using a few of your plugins successfully here.
    How can I set exported file encoding to utf8? I could not find it in the documentation. I tried several values, but the output is never encoded.

    Thanks 

    1. Are you referring to using the encoding parameter? Are you going to an attachment? 

      1. I am calling a run block that executes an sql plugin block that fetches some info from our servers. We're actually using confluence as a BI tool.

        Some of the values in the table can be in foreign languages - I've seen russian, japanese, but it can be anything. This is user data.

        Now, on screen, it renders correctly.

        But I am exporting it to a file, and then I have another run block that executes a jython script that sends the output html files as attachments on email. I've tried encoding on jython, and tried adding utf8 headers to the exported html files. But it seems that it's already saved currupt and I see all non ascii chars as gibberish.

        I tried using UTF-8 in the encoding fields of both sql and run macros, but it didn't help.
         

        1. I created RUN-121 for further discussions on this topic.

  34. Hi Bob,

    Our company is relatively new to Confluence and Jira, but it is quickly becoming the "Cool New Tool", which has prompted our management to explore the real possibilities of using it on a larger scale. Part of that is the creation of form templates, tables, reports etc. I've been working with some of the Plug ins and have become fairly familiar with them, but now it's time to take this to the next level and enable our users to select and complete forms with the click of a button. My research has pointed me to your Run plug and from what I've read so far, it is something special. 

    Here's my issue, I'm extremely new to all of this, but "Tag", I'm it and need some direction on the best way to learn how to use the tools to my advantage. I am not trying to make this complex, but want to provide my users with something that is easy to use and easily reportable.

    I can create basic forms and reports. I've been able to create templates where one form is accessed in multiple places and reported in others, so I am teachable. However, I'm not experienced like your followers.

    Where can I go to learn?

    Is there a place that may have some simple examples to start of with? Maybe, create a page from a simple form using your plugin. this would help me associate the macros and required fields within them.

    If a conversation via email, privately, would be more appropriate, I can certainly support that also.

    Thank you.

     

    1. Well, you are in the right area. Our examples need to be improved to make it easier to get started. That is something planned, but, not going to help you now. The simplest meaningful example can be found on Run macro. The next place to look is Release notes 2.0. Most show wiki syntax, but you can do the same through the macro browser. It is actually a bit easier to get a grasp of the concepts looking at the wiki text as it is easier to see the relationship between the parameters and replacement variables etc... The macro is very powerful, but can be a challenge to learn and make work effectively. Another related reference is How to use Confluence for Business Intelligence and Reporting and the other How to's. 

  35. Thanks for the help! So far, I've been able to create a very simple report with a Content Reporter using some of the comments posted above. I used the "c1" value as the label, which produced exactly what I expected. Now, I need to filter the report based on date value, which is entered by the user, Production Date. The filed on the form is a Data Data field and it is formatted as MM/dd/yyyy. I've tried to use every filter available, but can't seem to get this one right. My goal is simple at this point. Create a report based on a label - c1 and filter it by the Production Date - d1. Here is what I have so far:

    <ac:structured-macro ac:name="run">

      <ac:parameter ac:name="replace">c1::Enter a Label,d1::Enter a Production Date</ac:parameter>

      <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>

      <ac:parameter ac:name="titleRun">Submit</ac:parameter>

      <ac:rich-text-body>

        <ac:structured-macro ac:name="report-table">

          <ac:parameter ac:name="injected">true</ac:parameter>

          <ac:rich-text-body>

            <ac:structured-macro ac:name="content-reporter">

              <ac:parameter ac:name="scope">a specific page</ac:parameter>

              <ac:parameter ac:name="labels">$c1</ac:parameter>

              <ac:parameter ac:name="types">page</ac:parameter>

              <ac:rich-text-body> <ac:structured-macro ac:name="number-filter">

                  <ac:parameter ac:name="value">#d1</ac:parameter>

                  <ac:parameter ac:name="">data:prodDate</ac:parameter>

                </ac:structured-macro>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">CSR</ac:parameter>

              <ac:rich-text-body>

                <p>

                  <ac:structured-macro ac:name="report-info">

                    <ac:parameter ac:name="link">true</ac:parameter>

                    <ac:parameter ac:name="">content:title</ac:parameter>

                  </ac:structured-macro>

                </p>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">Description</ac:parameter>

              <ac:parameter ac:name="width">250px</ac:parameter>

              <ac:rich-text-body>

                <p>

                  <ac:structured-macro ac:name="report-info">

                    <ac:parameter ac:name="">data:csrDescription</ac:parameter>

                  </ac:structured-macro>

                </p>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">Production Date</ac:parameter>

              <ac:parameter ac:name="width">100px</ac:parameter>

              <ac:rich-text-body>

                <p>

                  <ac:structured-macro ac:name="report-info">

                    <ac:parameter ac:name="format">MM/dd/yyyy</ac:parameter>

                    <ac:parameter ac:name="">data:prodDate</ac:parameter>

                  </ac:structured-macro>

                </p>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">CR Number</ac:parameter>

              <ac:rich-text-body> %data:prodCRNumber%</ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">CR Status</ac:parameter>

              <ac:rich-text-body>

                <p>

                  <ac:structured-macro ac:name="report-info">

                    <ac:parameter ac:name="">data:prodCRStatus</ac:parameter>

                  </ac:structured-macro>

                </p>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">Code Review </ac:parameter>

              <ac:parameter ac:name="injected">true</ac:parameter>

              <ac:rich-text-body>

                <p>%data:prodCodeReview%</p>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">Mid Tier Testing Status</ac:parameter>

              <ac:parameter ac:name="injected">true</ac:parameter>

              <ac:rich-text-body>

                <p>%data:prodTestStatus%</p>

              </ac:rich-text-body>

            </ac:structured-macro>

            <ac:structured-macro ac:name="report-column">

              <ac:parameter ac:name="title">FRTT Testing Status</ac:parameter>

              <ac:parameter ac:name="injected">true</ac:parameter>

              <ac:rich-text-body>

                <p>%data:prodFRTTStatus%</p>

              </ac:rich-text-body>

            </ac:structured-macro>

          </ac:rich-text-body>

        </ac:structured-macro>

      </ac:rich-text-body>

    </ac:structured-macro>

    <p> </p>

    <p> </p>

    <p>

      <br/>

      <ac:structured-macro ac:name="report-info">

        <ac:parameter ac:name="format">MM/dd/yyyy</ac:parameter>

        <ac:parameter ac:name="">data:prodDate</ac:parameter>

      </ac:structured-macro>

    </p>

     

     Any suggestions? Be gentle please.

  36. I'd tried that originally and thought I'd seen a number referenced as "#d1", so I thought I'd give that one a shot. Unfortunately, both give me everything with the label I enter and it doesn't look like anything is filtered. The results will populate whether a date is present or not.

    1. Well $d1 is the only way you are going to get the run macro to make a replacement (smile). I would recommend getting your content reporter filter working properly first (without run macro) and then get the run macro to substitute in the right value from the parameter that you proved works. 

      BTW, are you sure a number filter will work on a date value ???

      Once that is working, I would recommend a date field with validation for the second parameter.

  37. Bob,

    Trying to use your Date field entry example to input dates into a MySQL DB table.  Here's my source:

    mo::Model Office Date:group,

    moyear:2014:Year:integer-select:2014:2015,

    momonth:1:Month:integer-select:1:12,

    moday:1:Day:integer-select-end:1:31

     

    I have 2 dates that need to be entered, hence the "mo", and I'm using the Parameters in the SQL plugin for the date values. everything else is "$....". The insert action works fine without the dates, but when I try to execute the input with dates, I get and error, "Error rendering macro 'sql' : com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect date value: '' for column 'modelOfficeDate' at row 1"

    I have the DB Table column set to DATE to accept, YYYY-MM-DD, but I know I've jacked up something with the way I'm sending the data over.

    I ran the INSERT function, already to ensure the values were accepted.

     

    Any ideas or examples for date entries?

     

    Insert Query with Run Macro.txt

     

    P.S. - Really dumb question, but how can I provide you with the wiki text I'm always seeing like in the comments above? I'd like to maintain form with your other followers.

    Thanks,

    1. Hi Bob, I figured out my problem and I'm able to insert date information into the DB.

      However, is a user didn't have any date information to enter, is there a way to offer blanks instead of values in the fields? This way, they could come back and edit the record.

      1. Not if you are using integer fields. You could use a select list with string values including the numbers and blank.