Page MenuHomePhabricator

Flow: close-reopen topic ignores requested moderationState
Open, MediumPublic

Description

While testing action=close-open-topic I returned to an old URL
workflow=<someTopic_UUID>&action=close-open-topic&flow_moderationState=close when someTopic was already closed.

Even though I'm directing it to close, the form's button is [Reopen topic] and the form's action is flow_moderationState=restore. Likewise if you do the inverse: if you try to reopen a topic that's already open, Flow just closes it. flow_moderationState is ignored.

I think at the API level Flow detects and warn "You can not close a moderated post" (flow-error-close-moderated-post). At the URL level it should work similarly: if you tell Flow to close a closed topic or restore one that's open, Flow shouldn't do the opposite of what you request, it should warn. I think that means adding a message for flow-error-restore-open-post.


Version: master
Severity: minor
URL: http://ee-flow.wmflabs.org/w/index.php?title=Talk:Sandbox&action=close-open-topic&workflow=rvui0exss9t3iw74&flow_moderationState=close

Details

Reference
bz67391