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

Add Field and JSON Editor interact poorly with each other in template editor #4343

Closed
asamarco opened this issue May 19, 2023 · 2 comments
Closed

Comments

@asamarco
Copy link

Detailed description of the problem

Trying to work on extra fields using both Add Field button and JSON Editor at the same time has some issues.

  1. when an extra field is added using the add field button the JSON editor is not updated with that change. Saving the template, and reloading the page is needed as a workaround.

  2. at this point, the updated page shows the correct JSON code in the editor but using again "Add Field" has no recollection of the groups that were already defined.

Expected Behavior

The content of the Add Field interface and of JSON editor should be always in sync

Steps to reproduce the behavior

  1. Add a group and an extra field with add field button -> JSON editor keeps the previous content
  2. Save the template
  3. Reload the template -> JSON editor now shows the correct content
  4. Use "Add field" button again -> the previously defined group(s) are not shown

What eLabFTW version are you using? Visible in bottom right of a page.

4.6.0-beta

Do you have any idea what may have caused this?

No response

Do you have an idea how to solve the issue?

No response

Additional information

No response

@asamarco asamarco added the bug label May 19, 2023
@asamarco asamarco changed the title Add Field and JSON Editor interact poorly one with each other in template editor Add Field and JSON Editor interact poorly with each other in template editor May 19, 2023
@NicolasCARPi
Copy link
Contributor

Hello,

Thanks for reporting this issue. I agree with you this should be improved.

@NicolasCARPi
Copy link
Contributor

A fix has been implemented and will be available in 4.8.0.

NicolasCARPi added a commit that referenced this issue Jul 25, 2023
* hypernext:
  next version is beta version
  fix issue with anonymous user could not use api calls
  some .eln related changes:
  Run cypress on circleci (#4484)
  fix anonymous login
  remove unused code
  improve sync between json editor and extra fields
  fix issue with extra fields not shown if ungrouped field deleted
  improve sync between extra fields and json editor. fix #4343
  add missing "saved" key for i18next
  add units to extra fields for numbers inputs
  add button to delete extra field
  update i18n french
NicolasCARPi added a commit that referenced this issue Jul 26, 2023
* hypernext:
  update portuguese, brazilian flavor
  update portuguese
  update indonesian
  update chinese translations
  update german lang
  fix for recent eln changes
  only show bookings from the future in dashboard
  next version is beta version
  fix issue with anonymous user could not use api calls
  some .eln related changes:
  Run cypress on circleci (#4484)
  fix anonymous login
  remove unused code
  improve sync between json editor and extra fields
  fix issue with extra fields not shown if ungrouped field deleted
  improve sync between extra fields and json editor. fix #4343
  add missing "saved" key for i18next
  add units to extra fields for numbers inputs
  add button to delete extra field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants