Skip to content

F fix max dropdown options

Florian Spreckelsen requested to merge f-fix-max-dropdown-options into dev

Summary

Fix for #345 (closed). Send the correct query string in case of BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1.

Focus

The original problem was that unlimited dropdown options would result in a P0L-1 query being sent, so this is now caught specifically.

Test Environment

Start LinkAhead with BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1 (i.e., default) and enter several hundred records, e.g., by

import linkahead as db
rt = db.RecordType(name="Test").insert()
db.Container().extend([db.Record(name=f"Rec{ii+1}").add_parent(rt) for ii in range(500)]).insert()

then, add Test as a reference prop to any entity and verify that all 500 records can be selected.

As a comparison, repeat for BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=10 and verify that it stops correctly after the first 10 entries and offers the possibility to enter an id manually.

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related issues
  • Up-to-date CHANGELOG.md (or not necessary)
  • Up-to-date JSON schema (or not necessary)
  • Appropriate user and developer documentation (or not necessary)
    • How do I use the software? Assume "stupid" users.
    • How do I develop or debug the software? Assume novice developers.
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md (or not necessary)
  • Appropriate user and developer documentation (or not necessary)
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there specifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Daniel Hornung

Merge request reports