How to display the sprint goal larger in the active sprint page ?

Cyril January 11, 2021

Hello,

I wish to display with a much larger font the sprint goal on the active sprint page. The name of the sprint is displayed very large and the sprint goal is displayed very small. I wish to switch that. 

Thanks for your help.

 

Cyril.

1 answer

1 accepted

0 votes
Answer accepted
mogavenasan
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.
January 11, 2021

Hi @Cyril

You can do this by hacking the UI. Place this script on the Announcement Banner and the Sprint Goal font size will be the same size as the Sprint name:

<script>

jQuery().ready(function() {
    if (window.location.pathname == '/jira/secure/RapidBoard.jspa') {
        console.log("This is a Agile board.");
        waitForElementToDisplay("#ghx-sprint-goal",function(){$("#ghx-sprint-goal").css("font-size", "24px");},1000,9000);
    }
});

function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) {
var startTimeInMs = Date.now();
(function loopSearch() {
if (document.querySelector(selector) != null) {
callback();
return;
}
else {
setTimeout(function () {
if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs)
return;
loopSearch();
}, checkFrequencyInMs);
}
})();
}

</script>

If you want to change any look and feel of the Sprint Goal, you can add the respective CSS styling on line 7 of the code.

I hope that this helps.

Thanks,
Moga

Cyril January 12, 2021

Many thanks Moga,

just one more question if you please.

Is it possible to do this only for one space, not all projects on the server ?

Will this disapear on any JIRA version upgrade ?

Have a nice day.

Cyril

mogavenasan
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.
January 12, 2021

Heya @Cyril

The script is looking for board URLs only - we can limit the script to work on specific boards if that's what you are looking for.

<script>

jQuery().ready(function() {
    if (window.location.pathname == '/jira/secure/RapidBoard.jspa' && window.location.search == '?rapidView=10') {
        console.log("This is a Agile board.");
        waitForElementToDisplay("#ghx-sprint-goal",function(){$("#ghx-sprint-goal").css("font-size", "24px");},1000,9000);
    }
});

function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) {
var startTimeInMs = Date.now();
(function loopSearch() {
if (document.querySelector(selector) != null) {
callback();
return;
}
else {
setTimeout(function () {
if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs)
return;
loopSearch();
}, checkFrequencyInMs);
}
})();
}

</script>

Please change the value rapidView=ID, you will need to make sure the ID is the board ID from the URL that you are accessing the board.

The content of the Announcement banner will not be removed during any Jira upgrade.

Thanks,
Moga

Like Cyril likes this
Cyril January 13, 2021

Wonderful. Thanks again for your quick answer. That is very helpful.

Suggest an answer

Log in or Sign up to answer