New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ontology): new method to change gui order (DSP-1567/DSP-1646) #440
Conversation
This PR needs a new version of DSP-JS with changes from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot update the prop field form, I tried with 2 versions of dsp-api (see screen shots):
here is the network preview log:
"knora-api:error: "org.knora.webapi.exceptions.BadRequestException: One or more submitted properties do not have cardinalities in class http://0.0.0.0:3333/ontology/0001/anything/v2#BlueThing: http://0.0.0.0:3333/ontology/0001/anything/v2#hasGeoname, http://0.0.0.0:3333/ontology/0001/anything/v2#hasInteger, http://0.0.0.0:3333/ontology/0001/anything/v2#isPartOfOtherThing, http://0.0.0.0:3333/ontology/0001/anything/v2#hasRichtext, http://0.0.0.0:3333/ontology/0001/anything/v2#hasOtherListItem, http://0.0.0.0:3333/ontology/0001/anything/v2#hasDate, http://0.0.0.0:3333/ontology/0001/anything/v2#hasColor, http://0.0.0.0:3333/ontology/0001/anything/v2#hasThingDocument, http://0.0.0.0:3333/ontology/0001/anything/v2#hasListItem, http://0.0.0.0:3333/ontology/0001/anything/v2#hasBoolean, http://0.0.0.0:3333/ontology/0001/anything/v2#hasDecimal, http://0.0.0.0:3333/ontology/0001/anything/v2#hasGeometry, http://0.0.0.0:3333/ontology/0001/anything/v2#hasText, http://0.0.0.0:3333/ontology/0001/anything/v2#hasThingPicture, http://0.0.0.0:3333/ontology/0001/anything/v2#hasInterval, http://0.0.0.0:3333/ontology/0001/anything/v2#hasUri, http://0.0.0.0:3333/ontology/0001/anything/v2#hasTimeStamp""
did I miss something?
@flavens You'll need at least DSP-API v13.7.0 (with the new route to update the gui-order https://github.com/dasch-swiss/dsp-api/releases/tag/v13.7.0) It's hard to say what was going wrong here. What's the message in the API error response of: |
With the anything ontology, the API response has been quoted in my message from the network tab. There is no more details in the console. |
Not in the console, but in the network... But I will also check-out this branch again. At the moment I'm working with the region-annotation-branch. @flavens Got it! I'll try to understand the issue here... |
There are several issues and I couldn't find a quick solution to keep the current implementation (s. my comment on Youtrack DSP-1567). I will separate the two requests now. |
As mentioned in one of the Youtrack issues, it was not possible to keep the current setup to change the gui-order of properties in a resource class. So I implemented a new way to change the gui-order (DSP-1646): Screen.Recording.2021-05-20.at.12.01.15.mov |
I have to dismiss this review, because the PR contains now a new implementation of the gui-order update process
resolves DSP-1567 and DSP-1646
This PR contains a quick solution to solve our update-gui-order-issue in case if the property is already in use (DSP-1546). Since we have two DSP-API routes to change either the cardinality or the gui-order, we should also split those tasks into different views in DSP-APP. This step will take more time and we have to fix the current state on our servers now. The current solution is as follow: We send to request to DSP-API: one to update the gui-order and one to update the cardinalities. The second request will throw always an error if the property is in use and has already data values. There's another workaround for that issue, but it's not yet published in DSP-API. So for now, I suggest to keep this "ugly" solution.