Seams like scheduled date doesn't Close decision.
Jet still "This decision is currently closed" message is visible.
When I click Cancel - I can't vote again.

CommentFileSizeAuthor
#4 Decisions-Poll_is_Active-966710-1.patch419 bytessoma115
2.png2.43 KBsoma115
1.png5.89 KBsoma115

Comments

soma115’s picture

Looks like flag "active" changes only at cron run by function decisions_cron().
Can we call function decisions_cron() one more time before "Cancel your vote" do the damage?
I was thinking about putting it just before anything else:

function decisions_cancel_form($form_state, $nid) {
decisions_cron();
$form['node'] = array('#type' => 'hidden', '#value' => $nid);
$form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote'));
return $form;
}

I don't suppose this is most elegant way but since I'm noob and solution is working... What do you say guys?

BTW: That JOIN in decisions_cron() - is it really necessary?

soma115’s picture

Assigned: Unassigned » soma115
soma115’s picture

Version: 6.x-1.x-dev » 6.x-1.8
soma115’s picture

Issue summary: View changes
StatusFileSize
new419 bytes

Patch attached. Please review.

soma115’s picture

Status: Active » Needs review
soma115’s picture

Version: 6.x-1.8 » 6.x-1.x-dev