Skip to content
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

Using "Re-order" in Questionnaires #66

Closed
2 tasks
HTsybenko opened this issue Sep 29, 2023 · 11 comments · Fixed by #101
Closed
2 tasks

Using "Re-order" in Questionnaires #66

HTsybenko opened this issue Sep 29, 2023 · 11 comments · Fixed by #101
Assignees
Labels
bug Something isn't working

Comments

@HTsybenko
Copy link

HTsybenko commented Sep 29, 2023

Using "re-order" of properties for existing data types (e.g. Projects) and then saving leads to the following response:

**ERROR dsv01: something unexpected has happend. Log-file has traceback

Log:
09-28 18:41:32|INFO:Start PASTA GUI
09-28 18:41:34|INFO:End PASTA GUI
09-28 18:41:38|INFO:Setting up slots for the editor..
09-28 18:41:38|INFO:User loaded the ontology data in UI
09-28 18:41:38|INFO:New type selected in UI: {Structure level 0}
09-28 18:41:38|INFO:Table Data updated..
09-28 18:41:38|INFO:Table Data updated..
09-28 18:41:38|INFO:Table Data updated..
09-28 18:41:38|INFO:New property category selected in UI: {default}
09-28 18:41:38|INFO:Table Data updated..
09-28 18:42:24|INFO:Re-order signal emitted for the position: {1} in the table..
09-28 18:42:24|INFO:Reordered the data, Actual position: {1}, New Position: {0}, data: {{'name': '-tags', 'query': 'What are the tags associated with the project?', 'required': True}})
09-28 18:42:26|INFO:User clicked the save button..
09-28 18:42:26|INFO: traceback initDocTypeView startMain()|app.exec()|self.triggered.connect(lambda : widget.execute(command))|ontologyForm.instance.exec()|self.database.initDocTypeViews(16)
09-28 18:42:43|INFO:Re-order signal emitted for the position: {2} in the table..
09-28 18:42:43|INFO:Reordered the data, Actual position: {2}, New Position: {1}, data: {{'name': 'status', 'query': 'What is the project status', 'list': ['active', 'paused', 'passive', 'finished']}})
09-28 18:42:45|INFO:User clicked the save button..
09-28 18:42:45|INFO: traceback initDocTypeView startMain()|app.exec()|self.triggered.connect(lambda : widget.execute(command))|ontologyForm.instance.exec()|self.database.initDocTypeViews(16)

@HTsybenko HTsybenko added the bug Something isn't working label Sep 29, 2023
@jmurugan-fzj jmurugan-fzj changed the title Using "Re-order" in Qestionnaires Using "Re-order" in Questionnaires Oct 5, 2023
@jmurugan-fzj
Copy link
Contributor

@HTsybenko I tried to reproduce this error, but could not see any error been thrown for saving the re-ordered structural types. Could you please let me know when exactly this problem have you noticed?

@HTsybenko
Copy link
Author

@jmurugan-fzj This issue can be recreated, for example, like this:

  1. In Pasta GUI, open Questionnaires/Ontology Editor. By default, Structure level 0 will be opened.
  2. Use the re-order button to move the "status" property above "-tags". Click "save".
  3. Use the re-order button to move the "status" property above "-name". Click "save".

After the last step, the terminal will respond with:
**ERROR dsv01: something unexpected has happend. Log-file has traceback

@jmurugan-fzj
Copy link
Contributor

jmurugan-fzj commented Oct 5, 2023

@HTsybenko I retried with the fresh database installation in the main branch version and could not reproduce this error! Please see this video: re_order_issue_trial

Log also does not show any critical errors:
image

@SteffenBrinckmann Since I am trying this on main branch, could this be something version specific? I mean, specific to the version used by Hanna?

@HTsybenko
Copy link
Author

@jmurugan-fzj I have checked the video you uploaded, and there you have immediately clicked the re-order button twice to move the "status" property above "-name" and then saved.
Following these steps also does not result in any errors on my side.

However, moving the "status" property in two steps, as described in my previous comment, does lead to an error message. Please try following the exact steps of the prior comment and let me know if there are any new messages.

@SteffenBrinckmann
Copy link
Contributor

I will investigate this issue using the main branch

@SteffenBrinckmann SteffenBrinckmann self-assigned this Oct 5, 2023
@SteffenBrinckmann
Copy link
Contributor

@HTsybenko @jmurugan-fzj Yes it is a bug but it is not due to the questionaires, it is the "well known" issue of couchDB and the python-library that we use: some/all updates to a previously written document (in the same Pasta session) lead to stupid results as the library seems to cache (save in between versions) and then gets confused.
In the medium term we have to update to the new python-library as the old one is depricated anyhow and the new version does not perhaps have the same issue.
On the short term, I suggest to restart the PASTA after each save. I know it is not ideal, but I cannot find another solution to this issue, which we run into so often.

@HTsybenko
Copy link
Author

In 2.4.16, the issue is still there.

@jmurugan-fzj
Copy link
Contributor

@HTsybenko This issue has not been fixed yet, I guess!

@SteffenBrinckmann I think, it's better to attach a list of issues which were fixed too along with your release version email, so Hanna can only tests those have been addressed.. I don't think she has look into every PRs for this purpose and moreover PR's are just meant for the developers!

@SteffenBrinckmann
Copy link
Contributor

@jmurugan-fzj

  • the list of fixed issues is written in the changelog there she can check
  • to fix this issue: can you please change the behavior of the save-button to "save&close dialoge"

@jmurugan-fzj
Copy link
Contributor

@SteffenBrinckmann Save and Close means, when you click the save button it should save the data and close the ontology editor? But how does that fix this issue? I remember, this error was occurring inside self.database.initDocTypeViews(16), closing the tool will stop the error been thrown inside initDocTypeViews? How does that work? :)

@SteffenBrinckmann
Copy link
Contributor

@jmurugan-fzj The close would result in a restart, which removes all the caches. That would then result in old caches not causing problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants