Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Gadget Title/lable/Headline???

Hey

Anyone know if (and how) its possible to add a title to a spefic gadget or section of gadgets on a dashboard/wallboard

I have to display a wallboard, with 2 identical gadgets (Column order gadget), and it would be nice to hade a header descriping what is shown below.

13 answers

1 accepted

3 votes
Answer accepted

We use the gadget "Text" above the gadget that needs a title.

The text gadget has to be enabled via System Plugin with the name "Atlassian JIRA - Plugins - Gadgets Plugin"

Instead of using the Text Plugin from Atlassian to add an extra header above the existing plugin titles - I've used it to embed some javascript to correct the title of the existing gadgets. It seems to work and looks great!

Steps to reproduce:

  • Enable the Atlassian Text Plugin (it is not enabled by default, because of security)
  • Add the Text gadget to the dashboard where you wan´t custom titles for our gadgets  
    • Usually I add the gadget to the bottom of the dashboard in a collapsed state (so the users don´t notice it so much)
  • In the Body field type the javascript given below
    • Make sure to edit the "gadget_titles" variable with the ids of your gadgets and wanted custom titles (use firebug etc. to find the gadget id's) 
<script type="text/javascript">


var gadget_titles = [
  { 
    id : "gadget-10200-title",
     title : "My new title 1"
   },
  {
    id : "gadget-10205-title",
    title: "My new title 2"
  }
  // Add gadget ids and titles here 
]
// Go through all the defined titles
gadget_titles.forEach(function(item, index) {
  // Get the title gadget element from the DOM:
  var element = parent.document.getElementById(item.id);
  if (element) {
    // Change the title
    element.textContent = item.title;
  }
})
</script>

 

 

 

Wow, great but looks dangerous as others here are pointing out.  Works great for my use-case.

This works great! But when I refresh the browser page the title reverts back and the script doesn't run until I go back into the Text gadget and hit save. Any way to fix that?

Well I had the same problem. It happens because some JIRA script loads afterwards and overwriting the custom headers (set by my script). I fixed this by adding a delay to the script, but this is not guarantied to work for everybody everywhere (it will only work in IE9 or above).
Maybe I could come up with a more bullet prof solution, but for now it works fine for us.

 

<script type="text/javascript">

var gadget_titles = [
  {
    id : "gadget-10200-title",
     title : "My new title 1"
   },
  {
    id : "gadget-10205-title",
    title: "My new title 2"
  }
  // Add gadget ids and titles here
]
 
// Wait for page DOM is loaded and the set the headers
document.addEventListener("DOMContentLoaded", function(event) { 
  // Extra delay is needed (another jira-script is overwriting the headers)
  window.setTimeout(initMyHeaders, 700);
});
 
function initMyHeaders() {
  // Go through all the defined titles
  gadget_titles.forEach(function(item, index) {
    // Get the title gadget element from the DOM:
    var element = parent.document.getElementById(item.id);
    if (element) {
      // Change the title
      element.textContent = item.title;
    }
  });
}
</script>
Like Vincenzo Parrello likes this

Thank you! That worked while using a Chrome browser as well. 

This works for dashboard, but not for wallboard in Jira 8.5. object "gadget-xxxxx-title" is not present in this view.

How to enable the "Text" gadget in Jira 6:

  • Go to Administraion section: Add-ons > Manage add-ons
  • Select 'System' from the drop down Add-on filter menu (it is next to the field 'Filter visible add-ons')
  • Open the section with name "Atlassian JIRA - Plugins - Gadgets Plugin"
  • Enable all 64 modules or scroll down the list until you find the module called "Text" and enable this one.

Via JIRA 'Administration', tab 'Plugins', click on 'Show system plugins'.

I this section we have "Atlassian JIRA - Plugins - Gadgets Plugin". (I don't remember explicitly installing this - but that is possible ;-) )

One of the 48 modules that comes with this plugin is "Text (text gadget)" and this module has to be enabled.

(We use JIRA version 4.4.4.)

I was working with some Wallboards and they did not seem to display the name of the Gadget in the wallboard, but they did show in the Dashboard.  A trick I used to get the name to show up at the top of the Wallboard item is to click the ... then Rename in the Gadget on the Dashboard, then add a space at the end of the name and then check the checkmark.  When you run it in wallboard, the name shows up!

New feature was released in July, where dashboard gadgets can now be renamed in JIRA. Just hover on the gadget's title bar and select the more (…) button. Then, choose Rename.

Hi Monika,

since which Jira version is this feature available?

We are on version 7.6 - Server and this option not visible.

I am using version 7.12.1 and I do not see this feature either. 

Hi Monika, looks like you're using JIRA Cloud, because this feature still isn't available in JIRA Server.

All others interested in this feature, please vote:

 https://jira.atlassian.com/browse/JRASERVER-19766

Hello Monika,

we are using Jira Cloud and the renaming of gadgets works fine. However, the names (neither the original ones nor the renamed ones) are displayed in the wallboard mode. This is what is my problem atm.

 

Thanks in advance

Daniel

"The text gadget can make JIRA vulnerable to XSS attacks because it allows arbitrary html, which is why it is disabled by default".

Replacement has been requested to Atlassian. No commitment from Atlassian...though
https://jira.atlassian.com/browse/JRA-21965

It looks like the Text gadget works well for adding a title to a group of gadgets.  However, changing the title of a single gadget appears to be an issue that has been open for quite some time.  It seems like an easy enough thing to fix.  Go vote for it!

https://jira.atlassian.com/browse/JRA-19766

If Text is itself a gadget, then the new title would appear above the default title block in the wallboard so if I create the Text Gadget "My Burndown", then the default "Agile Sprint Burndown Gadget" would still appear. What I am looking for is a way to replace the default text.

Same thing here.

Yeah... where is this?

Yeah... where is this?

Thanks, Alan! This is exactly what I was looking for! I just ask myself why such a helpful Gadget is disabled by default? (Jira 5.2.9)

Where is the Text Gadget to be found? It's not a stock gadget.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

135 views 1 2
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