Issue Screen Tab specific banner, possible to add one?

My issue screen has two tabs. I'd like to add a banner or a prominent reminder message that always shows on one of the tabs.

If not possible on the tab, then on the whole issue screen.

But I don;t want this to be a Global thing for all projects. Only for a specific project.

Thanks!

3 answers

1 accepted

This widget could not be displayed.

Ok, well you could create a text based custom field (free text or <255 characters) and set it to a default value with your message. You could restrict the scope of the context to the one project, or even have different messages per project...

Put the custom field as the top entry on the edit screen, then use the Behaviours plugin to make the field read only at all times.

https://studio.plugins.atlassian.com/wiki/display/JBHV/JIRA+Behaviours+Plugin

Of if you don't want to install a plugin, you could put some Javascript in the description of your custom field that always disabled the field to make it impossible to update.

It's not perfect, but I don't think there are any places to inject a template into the edit screen. If it was the Issue VIEW screen then you could have written a small plugin that used Web Fragments

https://developer.atlassian.com/display/JIRADEV/Web+Fragments

Thanks. I like the Custom Field approach with no plugin. Is there a way to format the text though? Jira says that you can use HTML to format, but that doesn't work because they escape all HTML content in fields. Also, are there any examples of using javascript in the field descriptions??

Here are the examples.... http://confluence.atlassian.com/display/JIRACOM/Using+JavaScript+to+Set+Custom+Field+Values And http://confluence.atlassian.com/display/JIRA/Fields+Allowing+Custom+HTML+or+JavaScript http://confluence.atlassian.com/display/JIRA/Creating+Help+for+a+Custom+Field http://confluence.atlassian.com/display/JIRA/Displaying+a+Field+Based+on+Another+Field+Selection With the HTML formatting, it refers to the field description, not the contents of the field. If it was view mode you could do something with the wiki rendered but it's no use in edit mode. If you want to b very specific, you could put the formatted message in the description and just hide the input box?

YES!! Got it!

<script type="text/javascript">

var el = document.getElementById("customfield_10653");

var labels = document.getElementsByTagName('LABEL');

for (var i = 0; i < labels.length; i++) {

if (labels[i].htmlFor != '') {

var elem = document.getElementById(labels[i].htmlFor);

if (elem)

elem.label = labels[i];

}

}

document.getElementById("customfield_10653").label.innerHTML = "";

el.disabled="true";

el.style.fontSize = "15px";

el.style.backgroundColor = "AliceBlue ";

el.style.color = "Blue";

el.style.fontWeight = "bold";

</script>

Very nice, well done! ;-)
This widget could not be displayed.

When you say your issue screen has two tabs, do you mean in the custom field data section? The section above description?

Or do you mean the tabs at the bottom of the screen (Comments, Change History...)

This widget could not be displayed.

I mean the Edit View of the issue has a second tab that I've added with other fields, custom and standard.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 5 hours ago in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

22 views 0 1
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you