Hi,
I'm looking to add the status of an issue in the backlog like this:
I have tried a lot of settings, but i cannot seem to get it right. This is my current view of issues on the backlog:
Could someone instruct me how to do it please?
Thanks!
Hy @Luiz Ricardo Pereira da Silva
You can add some javascript on the announcement banner and check if the user is login and if's not hide the banner.
You can check some info here: https://confluence.atlassian.com/adminjiraserver073/configuring-an-announcement-banner-861253135.html
You can view the code to check if a user is logedin here:
And to hide the banner: $(".aui-header").hide()
This isn't totally advised because they don't guarantee that is upgrade safe.
Best regards,
Pedro Felgueiras
I would use javascript in the announcement banner to hide the div. e.g to hide the announcement bannner if the user is not logged in.
Announcements
<script type="text/javascript">
function currentUserName() {
return AJS.params.loggedInUser;
}
var user=currentUserName();
if (user.lengeth==0))
AJS.$("#announcement-banner").hide();
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've tried that script in my announcement banner and it doesn't appear to work.
I checked the content of user and it is undefined whether a user is logged in or not.
Is some extra setting or add-on required for these variables to be initialised?
Kind regards,
Kim.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. Open the console and see if
AJS.params.loggedInUsergives you the username of the logged in user. If it does not return anything than you need to explore
$authcontext.loggedInUser.name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.