Page MenuHomePhabricator

SecurePoll: Allow editing some of the election config post election-start
Closed, ResolvedPublic5 Estimated Story PointsFeb 9 2021

Description

Motivation

Currently the elections held via SecurePoll cannot be modified once they begin. But often some minor changes to the elections need to be made after the election has started - such as when election admins withdraw or need to be replaced. This task is to allow some of the configuration settings of an election to be changed after the start of the election.

We won't be allowing modifying everything to risk any untoward consequences. Maybe we can start with:

  • Allowing changes to election admins
  • Allowing changes to the Return-to-URL field

Details

Event Timeline

Niharika created this task.
ARamirez_WMF set the point value for this task to 5.Jan 27 2021, 5:13 PM
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

Change 661336 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/extensions/SecurePoll@master] Allow limited editing of poll after start

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

Change 661336 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Allow limited editing of poll after start

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

@STran @Tchanders @Niharika When creating an election, the election's config is recorded in a page (e.g. https://vote.wikimedia.beta.wmflabs.org/wiki/SecurePoll:154). This page is not updated when the election is edited. Does it need to be?

So, for example, I created this election, and its config was recorded on this page. I then modified the return-url and admin list, but the page still records and admins and return-url when I first created it.

@STran @Tchanders @Niharika If you create an election on votewiki but "for" enwiki (say), if you update the admins on votewiki should it also update the admins on enwiki? Currently, it does not.

@STran @Tchanders @Niharika When creating an election, the election's config is recorded in a page (e.g. https://vote.wikimedia.beta.wmflabs.org/wiki/SecurePoll:154). This page is not updated when the election is edited. Does it need to be?

@STran @Tchanders @Niharika If you create an election on votewiki but "for" enwiki (say), if you update the admins on votewiki should it also update the admins on enwiki? Currently, it does not.

Thanks Dom - I think these are product questions for @Niharika @jrbs @drochford

Thanks Dom - I think these are product questions for @Niharika @jrbs @drochford

Thanks. I'll move this along then and we can raise follow up tasks if we think necessary.

While an election is running (i.e. between its start and end dates) you can edit the election, but only the Return-to URL and Admins. I tested that only those election properties were updated in the database, and everything else was untouched. I also tested that the Special:SecurePollLog reflects changes in admins.

I also retested editing an election before it started and after it ended, where you can update everything.

There are a couple of bugs I raised (T274644, T274641), but nothing significant.

Test environments

@STran @Tchanders @Niharika When creating an election, the election's config is recorded in a page (e.g. https://vote.wikimedia.beta.wmflabs.org/wiki/SecurePoll:154). This page is not updated when the election is edited. Does it need to be?

So, for example, I created this election, and its config was recorded on this page. I then modified the return-url and admin list, but the page still records and admins and return-url when I first created it.

I'm not sure why this isn't updating - is there somewhere else that updates if you alter the election settings? I think it should be tracked somewhere if changes like that are made to the elections, though they're not usually especially common (i.e. it's not too likely that a return-url is changed other than for a moved page or something).

@STran @Tchanders @Niharika If you create an election on votewiki but "for" enwiki (say), if you update the admins on votewiki should it also update the admins on enwiki? Currently, it does not.

I don't think this is necessary as long as they are updated somewhere; since the election is hosted on votewiki, having them update there is enough IMO.

@STran @Tchanders @Niharika When creating an election, the election's config is recorded in a page (e.g. https://vote.wikimedia.beta.wmflabs.org/wiki/SecurePoll:154). This page is not updated when the election is edited. Does it need to be?

So, for example, I created this election, and its config was recorded on this page. I then modified the return-url and admin list, but the page still records and admins and return-url when I first created it.

I'm not sure why this isn't updating - is there somewhere else that updates if you alter the election settings? ...

@jrbs Sorry to comment on a closed task. So obviously the election settings are updated in the database, and (I think) that is all that matters as far as SecurePoll is concerned. It is just the page above which is not updated. I am not sure what uses that page. Maybe it was designed for third party scripts. Would you like me to raise a bug to get it updated as well when we edit an election?

@dom_walden Raising a bug would make sense to me (unless @jrbs says different!)

@STran @Tchanders @Niharika When creating an election, the election's config is recorded in a page (e.g. https://vote.wikimedia.beta.wmflabs.org/wiki/SecurePoll:154). This page is not updated when the election is edited. Does it need to be?

So, for example, I created this election, and its config was recorded on this page. I then modified the return-url and admin list, but the page still records and admins and return-url when I first created it.

I'm not sure why this isn't updating - is there somewhere else that updates if you alter the election settings? ...

@jrbs Sorry to comment on a closed task. So obviously the election settings are updated in the database, and (I think) that is all that matters as far as SecurePoll is concerned. It is just the page above which is not updated. I am not sure what uses that page. Maybe it was designed for third party scripts. Would you like me to raise a bug to get it updated as well when we edit an election?

I think the database is good enough for functionality, but I would agree that the updates on the election itself should make it onto the config page as well (I figured the "edit" interface was just an interface for editing that config, so it's weird that it's not reflecting there). It does sound like a bug to me, maybe some kind of caching / purging problem?

I know that if you alter the admins through the database, it is not reflected onwiki until you edit something else about the election (thus kind of bypassing the cache or whatever is technically happening there), so maybe this is a similar issue?

I think the database is good enough for functionality, but I would agree that the updates on the election itself should make it onto the config page as well...

Thanks, I raised T276844.