Adds autocomplete to otherCatalogNumbers tag names #2218
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds autocomplete to the optional Tag Name box associated with otherCatalogNumbers. The autocomplete is collection-specific, allowing each collection to autocomplete with their own terms. In addition to providing autocomplete when the user starts typing, if the user clicks into an empty tag name box, it will provide a dropdown of all the previously used tag names in that collection.
I believe that someone asked about this feature in the December SSH support group meeting. It's a time-saver (no need to type "Accession Number" over and over), but more importantly, it would help ensure that this field uses a controlled vocabulary. Otherwise, I can foresee all sorts of typos.
It searches the omoccuridentifiers table for all tag names belonging to that collection. It can be a bit slow. Perhaps an index on omoccuridentifiers.identifiername would help, or maybe there is a better way to implement the query in RpcOccurrenceEditor.php.
Also, I've fixed a minor formatting bug.
Previously, when additional rows were added to the otherCatalogNumbers table (collections.editor.main, addIdentifierField()), the input boxes were missing a class name (IdNameInput, and idValueInput). I've added these.
Pull Request Checklist:
Pre-Approval
master
branch and PR'd using the merge option (not squashed) into thehotfix
branch.Development
branch, NOTmaster
Post-Approval
Development
branch, remember to use the squash & merge optionhotfix
branch, remember to use the merge option (i.e., no squash).Development
branch into the master branch, remember to use the merge optionhotfix
branch into themaster
branch use the squash & merge optionmaster
intoDevelopment
should be made with the merge option (i.e., no squash).hotfix
branch and create a newhotfix
branchhotfix
branch.Development
branch before a tagged release (i.e., before an imminent merge into the master branch), make sure to notify the team and lock theDevelopment
branch to prevent accidental merges while QA takes place. Follow the release protocol here.Thanks for contributing and keeping it clean!