diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-11-08 05:19:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-08 05:19:16 +0300 |
commit | d5c9010a9a3a2db3e3564f8e1b92e81215e275c5 (patch) | |
tree | 98adbe942ba8912211efaefce82330ad2e06f0c8 /plugins/SegmentEditor | |
parent | 99a60500603a1d0c2d66d722670cd72dc25e9d88 (diff) |
Fixes a couple segment handling regressions in the UI (#15110)
* When trying to see whether we should decode a segment, favor encoded segment since it appears to be more common.
* Replace existing param in URL if it exists but empty (eg, segment=).
* If editing segment during comparison, remove comparison in case edited segment is one being compared.
* Solve the problem of matching segments that end up decoded a different way to avoid side effects.
* Revert test file change.
* Add test for getStoredSegmentName().
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r-- | plugins/SegmentEditor/javascripts/Segmentation.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js index 70e37d779d..1c5618b049 100644 --- a/plugins/SegmentEditor/javascripts/Segmentation.js +++ b/plugins/SegmentEditor/javascripts/Segmentation.js @@ -939,10 +939,10 @@ $(document).ready(function() { segmentDefinition = this.uriEncodeSegmentDefinition(segmentDefinition); if (piwikHelper.isAngularRenderingThePage()) { - return broadcast.propagateNewPage('', true, 'addSegmentAsNew=&segment=' + segmentDefinition); + return broadcast.propagateNewPage('', true, 'addSegmentAsNew=&segment=' + segmentDefinition, ['compareSegments', 'comparePeriods']); } else { // eg in case of exported dashboard - return broadcast.propagateNewPage('segment=' + segmentDefinition, true, 'addSegmentAsNew=&segment=' + segmentDefinition); + return broadcast.propagateNewPage('segment=' + segmentDefinition, true, 'addSegmentAsNew=&segment=' + segmentDefinition, ['compareSegments', 'comparePeriods']); } }; |