Cadasta / cadasta-qgis-plugin

[DEPRECATED] QGIS plugin to create, edit, upload and download Cadasta projects
GNU General Public License v3.0
4 stars 7 forks source link

QGIS Create Project :: Not allowing for custom location_type values #223

Open SteadyCadence opened 7 years ago

SteadyCadence commented 7 years ago

I edited the json in the "Create Project" step and am still getting an error about the choices-- even though I edited the json to allow for that choice...

Not sure if this is API or QGIS issue.

screen shot 2017-07-19 at 4 58 06 am

@wonderchook, could you take a look?

dpalomino commented 7 years ago

Hey @SteadyCadence!

I saw this issue as well. I think it's related to having custom tenure_type or location_type choices.

screen shot 2017-07-17 at 17 38 28

Maybe an API issue? In that example OT and EP were location types.

SteadyCadence commented 7 years ago

Its not an API bug. The values are hard coded in on the plugin side.

Kartoza team, the location_type and tenure_tyoe fields can have custom values so we need a way for those values to be dynamically populated or for the user to be able to list the values (instead of match it up with a column in the layer's table).

I think a text box that asks the user to list the values of the location_type may be the best way. Maybe they list the labels and the plugin automatically trims the names/keys to ten lowercase letters?

On Jul 19, 2017 11:53 PM, "David Palomino" notifications@github.com wrote:

Hey @SteadyCadence https://github.com/steadycadence!

I saw this issue as well. I think it's related to having custom tenure_type or location_type choices.

[image: screen shot 2017-07-17 at 17 38 28] https://user-images.githubusercontent.com/17198051/28388857-60cca328-6cd4-11e7-94e7-f150e4cc34a3.png

Maybe an API issue? In that example OT and EP were location types.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Cadasta/cadasta-qgis-plugin/issues/223#issuecomment-316513829, or mute the thread https://github.com/notifications/unsubscribe-auth/AYKfFkoYOX1M4a0DNPEe5YOs6xlPsX0mks5sPmy6gaJpZM4OcIyt .

dimasciput commented 7 years ago

Could you copy here the json you edited?

wonderchook commented 7 years ago

@SteadyCadence then how is the server sending back a 400 error? Do you mean it is hardcoded for when the questionnaire is created?

MappingKat commented 6 years ago

I am running into this issue again. The location_type seem to be hard coded somewhere because it won't accept new values when I write it in json in the "Advanced" setting.

MappingKat commented 6 years ago

Here is example json for the location type that I would like to use:

{
  "name": "location_type",
  "label": "Type of land",
  "type": "S1",
  "required": false,
  "options": [{
      "name": "agfield",
      "label": "Agricultural Field"
  },{
      "name": "bush",
      "label": "Bush"
  },{
      "name": "graze",
      "label": "Grazing Land"
  },{
      "name": "garden",
      "label": "Garden"
  },{
      "name": "woodland",
      "label": "Woodland"
  }]
}