plan-your-vote / plan-your-vote-cms

1 stars 8 forks source link

Transfer selected data from one election to another #86

Open medhatelmasry opened 5 years ago

medhatelmasry commented 5 years ago

When creating a new election, instead of recreating all the information from scratch, it should be possible to copy over selected data from a previous election.

medhatelmasry commented 4 years ago

Victor Sze added feature to copy an election. This, however, breaks with first election and crashes the site.

victorsze commented 4 years ago

Joey fixed the bug when copying the first election.

Crashing the site is unrelated to this issue and happens when you delete an election that is currently managed / selected.

medhatelmasry commented 4 years ago

add prefix "copy to" + index on election that was copied

joey-tang commented 4 years ago

Crashing the site is unrelated to this issue and happens when you delete an election that is currently managed / selected.

Opened new issue for this bug.

For copying: When deleting a candidate, the image associated with them is also deleted. We should either change this or upload duplicate images when copying.

medhatelmasry commented 4 years ago

It is necessary to make copies of all images when an election is being copied.

joey-tang commented 4 years ago

I made a mistake in my earlier comment, deletion happens on editing a candidate and replacing that image.

I added a check on this method so the default.jpg file is never removed, copied elections will now have its candidates use this image per Medhat's recommendation.