COU-623 - UI bug causing restore to happen from baseline

Created by Claus Jensen 07 Sep 2017, 13:19:05 Updated by Shannon Deminick 12 Sep 2017, 06:42:34

Tags: Unscheduled

Subtask of: COU-521

There's a bug in the UI causing a content restore to happen from a baseline, unless you explicitly select the baseline and then reselect the "Live" setting when restoring.

Comments

Claus Jensen 08 Sep 2017, 07:26:25

PR: https://github.com/umbraco/Umbraco-Courier/pull/113/files?w=1

There's a lot of formatting/whitespace causing it to look like a lot was changed.

This is the actual changes in the code:

https://github.com/umbraco/Umbraco-Courier/pull/113/files?w=1#diff-f4d85b839acd1bd24af20ef8691001a5L5 Removing the alternativeTarget which really had no use at all besides being confusing and causing stuff to be null sometimes.

https://github.com/umbraco/Umbraco-Courier/pull/113/files?w=1#diff-f4d85b839acd1bd24af20ef8691001a5L127 Using $scope.environment.destination instead of alternativeTarget (they were the exact same thing since altTarget was set to the same thing as destination when changing target....)

Problem was that if changeDestination wasn't triggered during init, alternativeTarget was never set to a value .. so restoring without touching the dropdown after opening the dialog, would cause a restore to be initiated with alternativeTarget being null - causing it to happen from whatever the server defaults to... in some cases something else than what was actually shown on init in the UI. Now the restore just uses $scope.environment.destination directly - which the UI is also bound to.


Priority: Major

Type: Bug

State: Fixed

Assignee:

Difficulty:

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 3.1.4

Due in version: 3.1.5

Sprint: Sprint 67

Story Points: 1

Cycle: 4