Is it possible to active voting for only one project?

Hello mates,

is it possible to active voting for only one project. I can turn voting on for the whole Jira instance. But I need to turn on for exactly one project. While browsing the internet I found this thread:

http://forums.atlassian.com/thread.jspa?threadID=28177

I guess, this is a way to solve my problem, but I don't know where to find such a file in my current Jira version. We are using Jira 4.4 and we are planning an update to a 5.0.x version. So the best would be an answer for both versions.

Thank you for your help!

Best regards,

Steve

3 answers

1 accepted

2 votes
Renjith Pillai Community Champion May 24, 2012

Dont' mind this answer.

I think you could also probably hide the voting section by stuffing in some jQuery based script inside the Announcement Banner except for the project you want to enable.

<script type='text/javascript'>
AJS.$(document).ready(function() {
    var projectName = AJS.$("#project-name-val").text();
    if(projectName != 0 && projectName != "Test Project") {
        AJS.$("#votes-val").hide();
    }
});
</script>

Thank you for this solution approach. It is a smart way to fix that. I turned it around and switched off by css and then turned on by JavaScript. Maybe there is someone having JavaScript turned off. :)

<style type="text/css">
#votes-val {
  display:none;
}
</style>

<script type='text/javascript'>
AJS.$(document).ready(function() {
    var projectName = AJS.$("#project-name-val").text();
    if(projectName != 0 && projectName == "Test Project") {
        AJS.$("#votes-val").show();
    }
});
</script>

But still there is one "security" problem. The link for voting is still present in the HTML source code.

I think this solution is still the right way for me. Thank you very much for your fast and good answer! :)

Renjith Pillai Community Champion May 24, 2012

You are welcome :)

how about hiding the vote link in the activity stream? trying with the css class of the link nothing happens:

<style type="text/css">
#votes-val, #toggle-vote-issue, #view-voters, a.activity-item-issue-vote-link, .activity-item-issue-vote-label  {
  display:none;
}
</style>

firebug tells me, that there is no format definition that manipulates the display attribute on that classed element. the css code is inside the html and at the other places it works. maybe is it a problem, because the activity stream is loaded via ajax?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,111 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot