Is there a file I can edit on the server to change the html displayed text on any project administration Versions page?

Geoff Wilson
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 17, 2016

Quite simply, for those that have experimented with changing the look and feel of JIRA server, is there any HTML, XML, or other file that can be edited on the server (in the home or installation directory I presume) to edit or add to the displayed text on any project administration Versions page? 

The text currently reads, "For software projects, JIRA allows you to track different versions, e.g. 1.0, 2.0. Issues can be assigned to versions." However, as I debate alternative solutions to my other questions such as https://answers.atlassian.com/questions/44220923, I look into fixing usability issues in bandaid-like solutions to our program's needs and in this case could benefit from editing what help / instructive text is displayed on this particular JIRA webpage. 

I've actually edited quite a few server files before such as changing the order that Issue toolbar buttons like Link and Move are displayed, changing description text of system fields like Linked Issues, etc so I'm aware of what precautions lie in tinkering and also that they'll be lost on application upgrade. 

2 answers

1 accepted

1 vote
Answer accepted
Volodymyr Krupach
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 17, 2016

> OR is there any javascript I could add to say the Announcement Banner

Actually you answered your question.and banner JS is better than changing JIRA sources. Sample for you to change versions text:

jQuery("#project-config-webpanel-summary-versions .project-config-webpanel-help p").text("Hello there!");
Geoff Wilson
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 18, 2016

I tried to put that, wrapped in the script tags, into the Announcement Banner but I cannot see that text showing up anywhere on a Project's Versions page or any page rather? Have you tested it on your system by any chance? Also, we're on JIRA 7.1.9 server right now

<script type="text/javascript">
jQuery("#project-config-webpanel-summary-versions .project-config-webpanel-help p").text("Hello there!");
</script>
 
Volodymyr Krupach
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 18, 2016

Sure, I tested under JIRA 7.0.5.

Geoff Wilson
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 18, 2016

Did you put your line into the announcement banner with the same tags as I commented?  Wondering why it wont' work for me (trying to understand some of the web fragments code, but not familiar with it). 

 

Volodymyr Krupach
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 18, 2016

yes, I put it as 

<script>
jQuery("#project-config-webpanel-summary-versions .project-config-webpanel-help p").text("Hello there!");
</script>

Probably different css class or html structure for your JIRA version.

 

Geoff Wilson
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 18, 2016

Actually, i'm testing it on our development instance which is still at 7.0.10 which shouldn't have changed from your 7.0.5.  But i'll keep trying to look into understanding it and figuring out why it's not working. 

To confirm, this would be showing up in the Admin settings > Versions page right?  where exactly on the page?

Volodymyr Krupach
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 19, 2016

Hi Geoff,

I checked it once more with JIRA 7.0.10 and found that script is executed before the content is loaded so it's needed to be wrapped in "toInit" JS. Here is working version tested with 7.0.10:

&lt;script&gt;
AJS.toInit(function($) {
  require([ 'jquery' ], function($) {    
    $("#project-config-webpanel-summary-versions .project-config-webpanel-help p").text("Hello there!");
  });
});
&lt;/script&gt;

Here is the page were I outlined the jQuery selectors so you can copy the approach for different locations. Notice that ids are prefixed with "#", classes with "." and tags are put straight. It's quite simple and you can google jQuery selectors if you need more sophisticated way to find/replace a content:

image2016-11-19 17:28:53.png

The announcement banner looks like this:

image2016-11-19 17:30:6.png

Volodymyr Krupach
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 19, 2016

Update: Adding content to the announcement banner actually shows it and in case of script it's en empty line. In case you do not want the empty announcement banner you can add scc to hide it right below the script:

&lt;script&gt;
AJS.toInit(function($) {
  require([ 'jquery' ], function($) {   
    $("#project-config-webpanel-summary-versions .project-config-webpanel-help p").text("Hello there!");
  });
});
&lt;/script&gt;
&lt;style&gt;
#announcement-banner {
  display: none;
}
&lt;/style&gt;
Geoff Wilson
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 21, 2016

Thanks for all of these very detailed answers.  With this latest script, I can see the Hello There as the only text below the Versions section title on the Project's Summary page.  I'll start with this and look into how to get the text also on the actual Version's page (not just summary).

0 votes
Geoff Wilson
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 17, 2016

OR is there any javascript I could add to say the Announcement Banner that'll show any new desired text on the Versions page when that particular page is opened?

Suggest an answer

Log in or Sign up to answer