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

backport scheming draft_fields_required=false support #1

Open
wants to merge 7 commits into
base: twdh-patches-2.10.5
Choose a base branch
from

Conversation

wardi
Copy link
Collaborator

@wardi wardi commented Oct 25, 2024

backport of ckan#8309 to work with ckan/ckanext-scheming#418

@twdbben
Copy link
Collaborator

twdbben commented Oct 30, 2024

Thanks for this, Ian. I will have an opportunity to test this once I complete work on our upgrade to 2.10, hopefully early next week.

@twdbben twdbben self-requested a review November 8, 2024 16:42
Copy link
Collaborator

@twdbben twdbben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not had the opportunity to run this code locally yet but it looks good to me based on visual inspection.

@twdbben
Copy link
Collaborator

twdbben commented Nov 22, 2024

@wardi Per my demo in the tech talk meeting you attended on Wednesday, my attempt at using this is having an issue when creating a new dataset. I'll describe what I think are the relevant details here.

  • ckanext-twdh_theme is not turned on, so it is not causing conflicts

  • Our dataset.yaml defines a field on dataset form page 2 called collection_method, which is set to true.

  • When I fill out the fields on dataset form page 1 for a new dataset and click 'Next', the form comes back with 'Collection Method: Missing value'

  • However, in the background the dataset has been created. If I go to my profile page, the new dataset shows, and is marked as 'Draft'.

  • If I then click on the new dataset from the profile and go on to edit it, clicking 'Next' from form page 1 correctly takes me to form page 2 without the error.

  • If on form page 2 I click 'Next' without completing the required collection_method field, it works as expected.

  • If I 'Next', 'Next', 'Next' all of the way through the form and try to 'Finish' at the end without having completed the collection_method field, it correctly gives me the 'Collection Method: Missing value' error.

  • If I go back and set the collection_method field and then try to 'Finish', it correctly finishes the dataset

  • All of which is to say, everything seems to be working except for the 'Next' button on form page 1 incorrectly throwing the error on the required field from page 2.

Let me know if there is anything I can try on my end, or if I can clarify any of the above.

@wardi
Copy link
Collaborator Author

wardi commented Nov 24, 2024

@twdbben the schema is 404 for me, is there another link?

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.

2 participants