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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

User Macro : access to script variable outside of script

GrBr I'm New Here Dec 07, 2020


I am currently trying to create a big user macro, and one of the things I am trying to do is get a version of our tests via an ajax call and use that variable to feed it as a parameter to another macro outside of the script. It's hard to be super clear so here is the example :

<script type="text/javascript">

var component= $("#componentHidden").text()
var myversion=$("#versionHidden").text()

var myurl="fully_working_jql"

xhrFields: {
withCredentials: true
url: myurl,
async: false,
cache: false,
success: function(response,st,xhr) {
var the_parameter_I_get_back = response.issues[0].key ;
error: function(xhr, status, error) {
var err = xhr.responseText;

<ac:structured-macro ac:name="jirachart" ac:schema-version="1" ac:macro-id="working_macro_id">
<ac:parameter ac:name="border">false</ac:parameter>
<ac:parameter ac:name="showinfor">true</ac:parameter>
<ac:parameter ac:name="server">Test</ac:parameter>
<ac:parameter ac:name="jql">issue in testExecutionTests('here_is_where_I_want_to_use_the_parameter')</ac:parameter>
<ac:parameter ac:name="statType">issuetype</ac:parameter>
<ac:parameter ac:name="chartType">pie</ac:parameter>
<ac:parameter ac:name="width" />
<ac:parameter ac:name="isAuthenticated">true</ac:parameter>
<ac:parameter ac:name="serverId">working_server_id</ac:parameter>


Is this even possible ?

I thought about using the title if it isn't to store the data, but I couldn't find the way to change the title in the script.

Thanks for your help.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

78 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you