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

Retrieve a single field value from JIRA in Confluence.

voisard November 22, 2016

The goal is to build a Confluence page from a template. This template uses a variable that will contain on JIRA issue key. We use a user macro that passes that key as part of a JQL query to the regular JIRA macro. The result is as usual wrapped in a table.

Now I wonder if you know any possibility to retrieve just one field value and return it to Confluence without any markup around, so e.g. it can be used in floating text.

My attempt to find an answer even by excessive googling so far was unsuccessful. So if you can share resources that clarify my issue, please feel free to do so.

2 answers

1 accepted

0 votes
Answer accepted
Steven F Behnke
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 22, 2016

This is not possible out of the box. There are some add-ons that accomplish this, such as this one.

voisard December 5, 2016

Thank you for your answer, Steven!

Manjunatha K R April 4, 2017

Using this add-on, is this possible to get Jira "Components" system field and it's values return it to Confluence page e.g. it can be used in floating text?

0 votes
Paul Biagio May 10, 2017

So I hacked together some code quickly to resolve this issue (I created a user macro for it):

<script>
AJS.toInit(function(){
 setTimeout(function(){    
  AJS.$(".jira-table").each( function() {
   if (AJS.$(this).find( "td" ).length == 1) {
    var text = AJS.$(this).find(AJS.$("td.jira-macro-table-underline-pdfexport")).text();
    AJS.$(this).html(text);
   }
  });
 }, 500); 
});
</script>

 

Manjunatha K R May 10, 2017

Hi Paul,

what it doesn, means is it possible to get Jira "Components" system field and it's values return it to Confluence page for users selection using this User Macro - please confirm.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events