Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there example code / tutorial for a configurable macro?

J D
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.
November 14, 2014

I want to build my own macro with a configurable search on a db view. To do this i´m searching for example code or a tutorial to make a configurable macro. 

It could/should look like this:

AWLK-Macro.PNG

key | Servename | description | state | typ |

As you see in the picture in the end it should shown like the JIRA issues:

Unbenannt2.PNG

Any suggestions on this? Any good ideas what i have to consider? Or does someone has experience with this? Do you know a tutorial for this?

 

Best regards

J.D.

 

 

 

For the following problem have a look here.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Steve Gerstner [bridgingIT]
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.
November 14, 2014

There are several tutorials for creating confluence macros here: https://developer.atlassian.com/display/CONFDEV/Macro+Tutorials+for+Confluence

J D
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.
November 14, 2014

https://developer.atlassian.com/display/CONFDEV/Writing+a+Macro+Using+JSON This would be the tut i was looking for but sadly it doesnt work on confluence 5.6.4. Thats why im asking if there is a working tut.

Steve Gerstner [bridgingIT]
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.
November 14, 2014

What is not working exactly?

J D
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.
November 14, 2014

at the end of the tut, after i run atlas-run and when i insert the macro i doesnt get displayed

Steve Gerstner [bridgingIT]
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.
November 14, 2014

You are at step 6? And you don't see the text? Can you check the confluence version in your pom.xml?

J D
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.
November 14, 2014

im at step 9

J D
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.
November 14, 2014

<properties> <confluence.version>5.6.4</confluence.version> <confluence.data.version>5.6.4</confluence.data.version> <amps.version>5.0.4</amps.version> <plugin.testrunner.version>1.2.0</plugin.testrunner.version> </properties>

Steve Gerstner [bridgingIT]
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.
November 14, 2014

ok, then the problem seems to be in the javascript... what is your browser-console saying? Besides that, one idea.... replace all jQuery-calls with $(... with AJS.$(....

J D
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.
November 14, 2014

replaced - does not work

J D
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.
November 14, 2014

Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) Welcome+to+the+Confluence+Demonstration+Space:1 DEPRECATED: jquery.autocomplete.js - See https://ecosystem.atlassian.net/browse/AUI-393 batch.js:9504 Creating iframes batch.js:9504 2DEPRECATED: getArrowPath - See https://ecosystem.atlassian.net/browse/AUI-1362 batch.js:9504

Steve Gerstner [bridgingIT]
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.
November 14, 2014

Can you call initExampleMacro(); in the browser console? and what happens when you do it? Can you inspect your dom and can you find this snipet there? <div class="exampleMacro"> <fieldset class="parameters hidden"> <input type="hidden" class="dayDates" value="$dayDateJson"> </fieldset> </div> Which value has the hidden field?

J D
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.
November 14, 2014

it looks all like the code from the tut. ncaught ReferenceError: initExampleMacro is not defined VM287:2(anonymous function) VM287:2InjectedScript._evaluateOn VM282:732InjectedScript._evaluateAndWrap VM282:665InjectedScript.evaluate

J D
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.
November 14, 2014

call initExampleMacro Uncaught SyntaxError: Unexpected identifiermessage: "Unexpected identifier"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: Error

Steve Gerstner [bridgingIT]
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.
November 14, 2014

but you do not need to use json here, if the rest of the tut works, try to play a little bit with it to get a feeling for the macro ;)

J D
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.
November 14, 2014

okay thanks.

J D
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.
November 14, 2014

i will try :)

J D
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.
November 19, 2014

The new Question if have: https://answers.atlassian.com/questions/10414987/ho-can-i-set-a-value-for-drop-down-menu-in-the-macro-browser If you are interested, i would appreciate your help. Thanks

TAGS
AUG Leaders

Atlassian Community Events