Issue Screen Tab specific banner, possible to add one?

Eric Blair March 14, 2012

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

0 votes
Answer accepted
MatthewC
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.
March 14, 2012

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

Eric Blair March 14, 2012

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??

MatthewC
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.
March 14, 2012
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?
Eric Blair March 15, 2012

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>

MatthewC
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.
March 15, 2012
Very nice, well done! ;-)
0 votes
Eric Blair March 14, 2012

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

0 votes
MatthewC
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.
March 14, 2012

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...)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events