CartoDB / cartodb

Location Intelligence & Data Visualization tool
http://carto.com
BSD 3-Clause "New" or "Revised" License
2.76k stars 650 forks source link

DO measures for points only show US and France #11318

Closed AbelVM closed 7 years ago

AbelVM commented 7 years ago

If you add a DO analysis to a points node, you can only choose US or France

image

And once there, you can only select a subset of all the available measures:

image

image

This behavior doesn't affect polygon nodes.

cc @ethervoid

ethervoid commented 7 years ago

Introduced by this change: https://github.com/CartoDB/cartodb/commit/735a89ca9613e0306eec42b75a2aaed7e510c19a#diff-01419ea49914454d67c389bff840cf96

Instead of pass empty string ('') we've to pass no arguments in case the geometry type is not a polygon

ethervoid commented 7 years ago

Acceptance tests

  1. Make sure you are testing in the cloud staging (rui1-rui2), with the data observatory enabled and obs general quota credits (10000 credits should be enough).
  2. Create a new map in Builder with a points datasets and another with a polygons dataset (you could use data library for it)
  3. Open the Chrome Dev tools and open the network tab
  4. Add a data observatory analysis for the points dataset
  5. Look for the following request url Request URL:https://your_user.carto-staging.com/api/v2/sql?q=select%20*%20from%20obs_legacybuildermetadata()
  6. Verify in the obs_legacybuildermetadata() that there are no arguments
  7. Repeat from step 3 for the polygon dataset and in the request url check that the 'sum' parameter is sent