Page MenuHomePhabricator

Create new topics on a Flow board
Closed, ResolvedPublic

Description

One of the most important tasks for many bots is creating new topics on talk pages. As talk pages are converted to Flow, bots must be able to create topics on Flow boards. This task will add a Site method to utilize the 'new-topic' API submodule, add user-facing code to Board, and create tests to ensure proper operation.

Event Timeline

happy5214 claimed this task.
happy5214 raised the priority of this task from to Medium.
happy5214 updated the task description. (Show Details)
happy5214 added a project: Pywikibot-Flow.
happy5214 moved this task from Backlog to Phase 1 on the Pywikibot-Flow board.

Change 223525 had a related patch set uploaded (by Happy5214):
[WIP] Create new topics on a Flow board

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

Ideally new Topic and Post objects can be instantiated as 'not saved' , and then saved using a .save() override where appropriate.

i.e. something like:

board = Board(site, board_uuid)
topic = Topic(site)
topic.board = board

topic_root = Post(topic, uuid=None)
topic_root.title = 'subject'
topic_root.text = 'body'

topic.root = topic_root
# note at this stage no write should have occurred
topic.save()

(T105439 would be similar)

This is hard to do right, and needs lots of unit tests to prevent regressions. As such it is not necessary for the initial Flow support, much like it wasn't included in the initial Wikibase support.

I'd prefer we create a new task for that so we can close this one once the current patch is merged. As you said, it's not needed right now.

Change 223525 merged by jenkins-bot:
Create new topics on a Flow board

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