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

Allow edits to chants with no existing full text; fix browse source dropdown #1716

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

dchiller
Copy link
Contributor

@dchiller dchiller commented Nov 21, 2024

To be reviewed/merged after #1711

Closes #1715. Refs #1713. Closes #1696.

Update tests to consistently use `make_fake_[model]` functions. Update use of these functions for the new argument structure.

Fix various type and linting issues in `make_fakes`.
Fix intermittently failing test by increasing types of institutions tested in SourceListViewTest.test_ordering. Adjust expected ordering tuples to account for these institutions.

Removes random assignment of a fake institutions `is_private_collector` field.
Modify options in the feast dropdown to include the feast and the range of folios on which the feast appears, rather than a single option for each feast-folio pair.

Remove duplicate tests of feast selector options on various views. Add single test for feast dropdown options.

Refs: 1707
…request

Fix behaviour of feast and folio dropdown selectors on Chant Edit page to show chants on a specific folio or for a specific feast so that the selector remains on the selected option. Fix blank headers for filtered lists of chants on Chant Edit page.

Modify instructions on the Chant Edit page when no chant is selected (these has previously suggested that only full texts and volpiano was editable via that page; this has been corrected to note that all chant fields are editable).

Modify SourceEditChantsView `get_object` method so that the edited chant is always set by pk rather than recency of creation. Previously, this had been effectively true when changes were made through the form, as Django parsed the URL parameter for chant pk into the request.GET queryset; however, since URL parameters cannot currently be set with the Django test client, tests of this views were relying on the recency of chant feature. Now tests and the live form rely on the same logic (the presence of a `pk` option in the form data itself).

Reduce extraneous querysets in SourceEditChantsView.

Refs: DDMAL#1707, DDMAL#1708


Follow DDMAL#1712 and conform pagination styling of the browse chants templates to other filterable table templates.
Allow edits to chants that did not have an initial full text to be saved even if no full text is added.

Add check for uniqueness of folio-c_sequence to the chant edit page. This requires inclusion of the chant source in the chant edit form: the form, view, and test are edited to add the source to the form.

Refs: DDMAL#1696.
Moves validity checks on the Chant Create view to the Chant Create Form.

Refs: DDMAL#1713.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SourceBrowseChantsView source dropdown has old sigla Allows edits to chants with no full texts to be saved
1 participant