Download & Extend

Allow users to override results with display of text

Project:Decisions
Version:6.x-1.7
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

The attached patch allows an admin to display text instead of poll results for as long as the option is selected. It is a checkbox and textarea in the Decisions Setting are of the node admin page.

AttachmentSize
decisions_override_results.patch11.43 KB

Comments

#1

This patch doesn't seem to work on a clean version of 6.x-1.3. Could you please look into this, this is exactly the feature I am in need of.

Thank you!

---- Error below ----

patching file decisions.install
Hunk #2 succeeded at 113 (offset -11 lines).
patching file decisions.module
Hunk #4 succeeded at 1109 (offset 11 lines).
Hunk #5 FAILED at 1157.
Hunk #6 FAILED at 1234.
Hunk #7 succeeded at 1310 (offset 11 lines).
Hunk #8 FAILED at 1539.
3 out of 8 hunks FAILED

#2

Status:active» needs review

Please mark the issue status properly when submitting patches. Thanks for your submission, I'll make sure I take a look at this before the next release.

#3

If you look at the original submission, I set it to "needs review," which is what I noticed you changed it to. Is there another status I should use? It appears that the status was changed somehow after my submission.

#4

Seems I got the patch to go through as I can now see the "override results with editor text" checkbox and textfield underneath. However any time I check it and enter text it disappears after saving. Any ideas?

#5

@ianmayar - the patch was against HEAD, since I had another committed patch after 6.x-1.x-3.

#6

@wonder95 - weird: seems like the status was changed silently somehow. Needs review is the right setting to make sure your patch is noticed.

#7

Status:needs review» needs work

I would very much like to commit this, unfortunately it breaks voting. As soon as I enable this and I create a decision with an override, I cannot vote or see results on a decision. This is because you have been a bit too enthusiastic in decisions_view() and removed all the code that made the voting form appear when there is an override.

There is also irrelevant whitespace in the patch.

Again, I think this patch is a great idea, but it needs work before it gets in. Sorry I took so long to test it...

#8

Oh, and the UI needs a little love... It would be less confusing if there was a javascript function that would hide the text until the checkbox is enabled.. Look at the end date field for how to do this.

#9

What needs to be done to get the ball rolling on this?

#10

As noted in #7, there are critical regressions introduced by the patch that need to get fixed.

#11

Hi anarcat, The non-profit I work for is interested in sponsoring this. Since you're the maintainer I'd like to offer this work to you first. If you are not available for the work I'd appreciate it if you could suggest someone else who is familiar with the module.

#12

#13

Version:6.x-1.x-dev» 6.x-1.7
Status:needs work» needs review

@animelion I've attached a patch for the latest stable version which provides this feature. Note that you will have to run update.php to update the database schema before this will work.

This works for me in testing and after some further review we'll roll a new stable release.

AttachmentSize
660578.patch 9.79 KB

#14

Here's a small improvement to the above patch which suppresses display of the 'results' tab when users don't have permission to see the results.

Also, note that users with the permission to inspect all votes will still see the votes tab regardless of whether override text is set.

AttachmentSize
660578.patch improved 10.96 KB