Closed landryb closed 2 years ago
if i do the query on a plot with a building (eg /cadastrapp/services/getBatimentsByParcelle?parcelle=630044000ZH0141
returns [{"dnubat": " A"}]
i see two requests done:
/cadastrapp/services/getBatiments?parcelle=630044000ZH0141
which returns 400 with the same error message (message Required request parameter 'dnubat' for method parameter type String is not present
)/cadastrapp/services/getBatiments?parcelle=630044000ZH0141&dnubat=+A
which gets a 200 code and proper building info in json format. In the UI, the building tab has proper information displayed.so, to fix this issue:
getBatiments
isnt called if getBatimentsByParcelle
returned nothinggetBatiments
isnt called without dnubat
argument.cc @catmorales
@tdipisa can you please tell my why you removed your assignment ? Is this issue triaged/being worked on ? Thanks.
@tdipisa can you please tell my why you removed your assignment ? Is this issue triaged/being worked on ? Thanks.
@landryb it seems this issue is referring the new Cadastrapp backend while our implementation of the ms2-cadastrapp plugin is based on the older version. I think this issue should be included in a new order @catmorales also because it relates to a feature we have released as part of the first delivery of the MS Cadastrapp plugin (marché subséquent N° 2) for which the warranty period is expired for a while now.
i'm pretty sure if you (at least) try to replicate with the old cadastrapp backend you'll see the issue - sadly right no it seems https://georchestra.geo-solutions.it/mapstore/#/context/urbanismecadastrapp seems broken as trying to select a plot yields no selection in the cadastrapp pane.
And i'm very sorry, but no "our implementation is based on the older version of the backend" isn't an acceptable justification for ignoring this issue, which i'm reporting on master because i'm experiencing it with ms2-cadastrapp master.
I'm sorry @landryb but I am not ignoring anything since I am here to answer you. It's good that you have opened this issue here, of course, since you have found a problem testing this extension with the Cadastrapp backend v2.0. I'm just saying/explaining that GeoSolutions has implemented this extension before of that new version of the backend. Therefore we cannot ensure it is fully compatible with it if we don't spend time to check and provide needed updates, that isn't a task or something that has been commissioned to us so far. This is the only reason why I've removed my assignment, that's it. I'm anyway happy and available to plan an update of the cadastrapp extension if/when needed, of course.
@landryb
i'm pretty sure if you (at least) try to replicate with the old cadastrapp backend you'll see the issue - sadly right no it seems https://georchestra.geo-solutions.it/mapstore/#/context/urbanismecadastrapp seems broken as trying to select a plot yields no selection in the cadastrapp pane.
For this maybe you can specify better the steps to reproduce on our DEV? It is not clear to me the selection I have to do to reproduce the problem. If there is a regression depending on the last update we have provided within the contract 3, we can provide a fix.
@landryb
i'm pretty sure if you (at least) try to replicate with the old cadastrapp backend you'll see the issue - sadly right no it seems https://georchestra.geo-solutions.it/mapstore/#/context/urbanismecadastrapp seems broken as trying to select a plot yields no selection in the cadastrapp pane.
For this maybe you can specify better the steps to reproduce on our DEV? It is not clear to me the selection I have to do to reproduce the problem. If there is a regression depending on the last update we have provided within the contract 3, we can provide a fix.
Well, yesterday it didnt work (eg clicking on a plot didn't yield any selection), today it does - but since i cant view building properties (no login with enough rights) i can't try to reproduce the issue on this instance.
ok, spent a bit more time on this issue and done a bit more investigations to see if it's a regression in the frontend or backend, the issue can be easily reproduced when opening the info form for a plot which doesn't contain buildings (eg /cadastrapp/services/getBatimentsByParcelle?parcelle=630044000ZH0141
returns an empty array):
/cadastrapp/services/getBatiments?parcelle=630044000ZH0141
query (without mandatory dnubat
argument) is done in ms2-cadastrapp master and was already done previously (i see it with ms2-cadastrapp 1.0.0-rc15
against backend 1.9.3)i can reproduce the issue with curl against both backends, 1.9.3 replies with a 200 code and an empty array while 2.0 replies with a 400 code.
so in a sense, yes it's a regression from running against the last version of the backend (which is more strict wrt missing parameters ?), but in the first place ms2-cadastrapp wasn't supposed to call getBatiments
without dnubat
(as it's been doing also before latest changes in ms2-cadastrapp) - the getBatiments
method in https://github.com/georchestra/cadastrapp/blob/master/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/BatimentController.java#L27 expects two arguments. Inside the method it checks for them, but i suppose since the spring upgrade the parameters are checked before by spring which returns the code 400. @pierrejego can you confirm that ?
since ms2-cadastrapp calls getBatimentsByParcelle
API first, it knows the list of existing buildings, and it's supposed to loop over them to call getBatiments
with their building id. I don't understand where that getBatiments
call without dnubat
comes from, but that's where the issue is.
I take note on the new behaviour of the cadastrapp 2.0 backend, certainly due to the upgrade of spring framework. I agree with this analysis :
ms2-cadastrapp wasn't supposed to call
getBatiments
withoutdnubat
And the @landryb PR seems correct to me because it makes sense to fix this on the front end side.
trying cadastrapp v2.0 backend (from https://github.com/georchestra/cadastrapp/commit/abc6ea5) with ms2-cadastrapp from current HEAD (eg https://github.com/georchestra/mapstore2-cadastrapp/commit/3cab1ba), selecting a plot without batiments, if i open the information form, i see in the network console that a wrong query is done to
/cadastrapp/services/getBatiments?parcelle=630044000ZH0013
the backend replies with a code 400 and
message Required request parameter 'dnubat' for method parameter type String is not present
going to the 'batiment' tab in the form shows an endlessly spinning spinner..