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

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! :)

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 24m ago in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

6 views 0 2
Read article

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