Skip to content

[Bug]: Fix swapped latitude/longitude in AsGeopoint preview - #720

Merged
fashxp merged 2 commits into
2026.3from
fix/447-asgeopoint-preview-2026.3
Oct 22, 2026
Merged

fashxp merged 2 commits into
2026.3from
fix/447-asgeopoint-preview-2026.3

Conversation

@fashxp

@fashxp fashxp commented Oct 21, 2026

Copy link
Copy Markdown
Member

What

AsGeopoint::generateResultPreview() now prints the latitude after Lat.: and the longitude after Long.:.

Why

The preview used getLongitude() for the Lat. label and getLatitude() for Long., so the mapping preview showed the values swapped. process() was already correct (GeoCoordinates(lat, lon)), so imported data is unaffected; only the preview text changes.
This is the same change as the earlier PR #716 (2026.x), re-cut on 2026.3 as a clean cherry-pick of 042d9d9 (2 files, +11/-1, no conflicts); #716 is closed in favour of this one.
Fixes #447

Verification

  • Unit/regression: FactoryOperatorTest::testAsGeopointPreviewLabelsLatitudeAndLongitude. On the host with the 2026.3 source: base gives Lat.: 2.3522 Long.: 48.8566, the fix gives Lat.: 48.8566 Long.: 2.3522.
  • Studio e2e (Data Hub mapping > Advanced > Transformations preview, CSV row lat=48.8566 / lon=2.3522): run on dev-2026.x with the identical change; base shows the swapped values, the fix the correct ones.

Not verified

The Studio e2e on 2026.3 itself; the classic admin; the import itself (code reading only, process() is unchanged); the full Codeception suite (CI runs it on this PR).

The preview printed the longitude under 'Lat.' and the latitude under
'Long.'. The imported value was already correct; only the text changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@fashxp
fashxp marked this pull request as ready for review October 21, 2026 20:13
Copilot AI balanced review requested due to automatic review settings October 21, 2026 20:13
@fashxp fashxp self-assigned this Oct 21, 2026
@fashxp fashxp added this to the 2026.3.4 milestone Oct 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped correction fixes the label mismatch and includes a targeted regression test, with no unresolved findings.

No open issues 🎉

What changed in this PR

Corrects swapped latitude and longitude values in the shared AsGeopoint preview formatter, addressing #447 without changing import processing.

Changes:

  • Pairs each preview label with the correct coordinate getter.
  • Adds a regression test using distinct latitude and longitude values.

The fix addresses the root cause at the formatter boundary without changing signatures or return shapes. No documentation or changelog changes are included. Tests were not run during this review.

File Description
tests/​unit/​FactoryOperatorTest.php Adds the preview-label regression test at lines 438–446.
src/​Mapping/​Operator/​Factory/​AsGeopoint.php Corrects the getter-to-label pairing at line 44.

Review effort: Balanced

@fashxp
fashxp merged commit dacd963 into 2026.3 Oct 22, 2026
26 of 28 checks passed
@fashxp
fashxp deleted the fix/447-asgeopoint-preview-2026.3 branch October 22, 2026 08:23
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
@fashxp fashxp linked an issue Oct 22, 2026 that may be closed by this pull request
@fashxp fashxp added the Bug label Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect preview for AsGeopoint Mapping operator

2 participants