Page MenuHomePhabricator

Ability to close poll
ClosedPublic

Authored by lpriestley on Apr 23 2014, 7:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 25, 4:49 PM
Unknown Object (File)
Fri, Oct 25, 9:26 AM
Unknown Object (File)
Oct 18 2024, 11:18 AM
Unknown Object (File)
Oct 18 2024, 7:31 AM
Unknown Object (File)
Oct 7 2024, 5:08 AM
Unknown Object (File)
Oct 1 2024, 5:11 PM
Unknown Object (File)
Sep 24 2024, 5:00 AM
Unknown Object (File)
Sep 19 2024, 10:46 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rP9a827096a74a: Ability to close poll
Summary

Fixes T3566 List of poll actions should include ability to close an open poll or reopen a closed poll.

Test Plan

Poll author should be able to close/reopen poll. Non-author should get policy screen when attempting to close/reopen poll.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lpriestley retitled this revision from to Ability to close poll.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
lpriestley added a task: Restricted Maniphest Task.
epriestley edited edge metadata.

Handful of minor inlines.

src/applications/slowvote/controller/PhabricatorSlowvoteCloseController.php
18

You can remove this check -- $this->id will always be set. This check is only important for controllers which can both create and edit objects, but this one only edits them.

61–63

You can just call $poll->getIsClosed() here and remove the $this->isClosed property.

67

The default text for cancel buttons is "Cancel", so just remove this variable.

79

This should send the user back to $close_uri, not "/".

You can check this behavior with:

  • control-click + open-in-new-window (to get a standalone dialog)
  • hit cancel

(With the Javascript dialog, "cancel" always just closes the dialog.)

This revision now requires changes to proceed.Apr 23 2014, 8:22 PM
lpriestley edited edge metadata.

Addressing feedback. Cleaning up PhabricatorSlowvoteCloseController.php

epriestley edited edge metadata.

awwyiss

src/applications/slowvote/controller/PhabricatorSlowvoteCloseController.php
29

(Looks unused.)

This revision is now accepted and ready to land.Apr 24 2014, 7:00 PM
epriestley updated this revision to Diff 21013.

Closed by commit rP9a827096a74a (authored by @lkassianik, committed by @epriestley).