With-the-Ranks / Spoke

With the Rank's fork of Politics Rewired's fork of Spoke
GNU General Public License v3.0
0 stars 1 forks source link

Answer option for root interaction step can be viewed in Script Preview #31

Open ajohn25 opened 3 months ago

ajohn25 commented 3 months ago

Describe the bug Script Preview will display an answer option for a root interaction step when the new root step was copy/paste blocked from a non root interaction step. A root interaction step should never have an answer option associated with it.

To Reproduce Steps to reproduce the behavior:

  1. Copy an interaction step with an answer option from a campaign (not the root step
  2. Paste the interaction step at the root of the campaign (or paste on another campaign
  3. Open script preview for the campaign and notice that the answer option for the pasted interaction step is shown (even though it's not visible on the campaign editor screen)

Expected behavior The answer option should be left empty whenever a root interaction step is created, even if it was copied from a non root interaction step

Screenshots image

Additional context This should ideally be fixed by ensuring the answer option isn't written to the database, not just hiding it from the script preview screen