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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

767 views 2 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