Is it possible to active voting for only one project?

skorzinetzki May 24, 2012

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

4 answers

1 accepted

2 votes
Answer accepted
Renjith Pillai
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.
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>

skorzinetzki May 24, 2012

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
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.
May 24, 2012

You are welcome :)

0 votes
Jonathan Hult January 31, 2019

There is a free app (for Server hosting) in the Marketplace which provides this functionality.

Voting Per Project

Jan Mueller June 27, 2019

Latest version: Jira Server 7.2.0 - 7.9.22016-11-22 Compatibility Release

Does anyone have it running in JIRA 7.12.x or even 8.x?

Jonathan Hult June 27, 2019

I have it running in 8.2.2.

Like Jan Mueller likes this
Jan Mueller June 27, 2019

OK; just installed in 7.12.3 and it works. 

0 votes
skorzinetzki May 28, 2012

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