Page MenuHomePhabricator

U3. Don't reuse board workflow when board is re-created
Closed, ResolvedPublic3 Estimated Story Points

Description

This should probably create an entirely new workflow, so old topics and the old header don't suddenly show up.

However, if so, the old topics and header should somehow still be undeletable (One approach to this is to require them to move the current board out of the way temporarily, undelete the old one, then move them out with T88140: Moving topics between boards when it's implemented).

Alternative is to un-delete the old board, but delete the old topics (they could still be undeleted through Flow later). But how to handle the header?

Related Objects

Event Timeline

Maybe we should allow flow_workflow to alternatively point to ar_id in the archive table, as a way to represent deleted boards.

DannyH renamed this task from Don't reuse board workflow when board is re-created to U3. Don't reuse board workflow when board is re-created.Apr 8 2015, 10:25 PM

@SBisson discovered that https://gerrit.wikimedia.org/r/#/c/200854/4/includes/RevisionActionPermissions.php seems to cause issues when submitting new topics to a new board.

Pretty sure the work on this patch could solve that problem, because that would change how to check if the board was deleted (I think the current method is what's causing the breakage, since it would likely also match non-existing boards)

Change 205247 had a related patch set uploaded (by Matthias Mullie):
Don't load existing workflows for deleted boards, create new workflow instead

https://gerrit.wikimedia.org/r/205247

Change 205247 merged by jenkins-bot:
Don't load existing workflows for deleted boards, create new workflow instead

https://gerrit.wikimedia.org/r/205247

@DannyH @Quiddity @matthiasmullie:

"However, if so, the old topics and header should somehow still be undeletable"

This hasn't been fully addressed. What should happen when I do:

  • Create a topic on a blank board
  • Delete the board
  • Recreate the board with a new topic
  • Undelete the original board

I would expect one of:

  • Shows all topics (from before deletion and from recreation) on a new merged board (I think this is probably most similar to standard behavior).
  • The version you just explicitly restored wins, and you only see topics from that
  • It explicitly blocks you from restoring in this case (shows an error message)

The current patch at https://gerrit.wikimedia.org/r/#/c/205613/ continues showing the topics from the re-created board after the undeletion.

AIUI:

Non-Flow discussions where a pages is deleted, recreated, then restored:

  • content from recreated page is displayed, nothing from restored page
  • revisions from restored pages are merged into history; the content of the restored page is via that way available

Given this: merging restored topics into the new board is different from current non-Flow pages. Neither does displaying the restored version.
Displaying the new board & making data from the restored board only available via history seems most in line with default page behavior. But Flow board don't really have "revisions" that can be "diffed" - I'm not sure how we could translate that concept :)

Right now, the best/quick solution may be to make restoring impossible if a new board has already been created where the restored board used to be & requiring it to be manually moved out of the way.
I think we already plan to allow moving topics between board - that would further aid people to manually merge recreated & restored board?

Displaying the new board & making data from the restored board only available via history seems most in line with default page behavior. But Flow board don't really have "revisions" that can be "diffed" - I'm not sure how we could translate that concept :)

I was thinking it's a similar concept, except instead of a merged list of revisions, it would be a merged list of topics. But you're right the effect is quite different.

Right now, the best/quick solution may be to make restoring impossible if a new board has already been created where the restored board used to be & requiring it to be manually moved out of the way.

This would work if we want to defer it, but we might want to decide this now.

If somebody undeletes a board, then I think they want the topics to come back.

To take Matt's example -- I'm going to call the first board A and the second board B, but it's the same page name.

  • Board A -- has topics A1, A2, A3
  • Delete board A
  • Create board B on the same page -- has topics B1, B2, B3
  • Then undelete board A

The only reason you'd want to undelete A is because you want the A topics to come back. Otherwise, why would you bother? I don't think people would try to undelete a re-created board just to get the header back.

So I think undeleting board A means that you now have board B, with topics B1, B2, B3, A1, A2, A3.