Feature #41 | Allow register date for physical sample when only the year or the year and month is known and accept Created and Updated as a date type - #199
Open
gabrielakuhn wants to merge 3 commits into
Conversation
* src/djehuty/web/wsgi.py: Accept the new date types when saving physical sample dates. * src/djehuty/web/resources/static/js/edit-physical-sample.js: Add Created and Updated in the date type dropdown. * src/djehuty/web/xml_formatter.py: Map the new date types to DataCite.
Let depositors register a date for physical sample when only the year or the year and month is known. * src/djehuty/web/validator.py: Accept dates in the form YYYY, YYYY-MM or YYYY-MM-DD. * src/djehuty/web/wsgi.py: Validate physical sample dates with the variable format rule. * src/djehuty/web/database.py: Store each date with the datatype matching its format. * src/djehuty/web/resources/sparql_templates/physical_sample_dates.sparql: Return the date as a string value regardless of datatype. * src/djehuty/web/resources/static/js/edit-physical-sample.js: Accept and display dates of any format.
* src/djehuty/web/resources/html_templates/depositor/edit-physical-sample.html: Replace the free text date field a panel where the user can choose date format. * src/djehuty/web/resources/static/js/edit-physical-sample.js: Handle the date panel entry and show the input accordingly with the selected format.
gabrielakuhn
force-pushed
the
wip-feat-41-igsn-dates-format
branch
from
July 31, 2026 16:14
06dbac6 to
ebb33d1
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## wip-feat-41-igsn-fix-draft #199 +/- ##
==============================================================
- Coverage 16.33% 16.32% -0.01%
==============================================================
Files 21 21
Lines 11447 11460 +13
Branches 2246 2250 +4
==============================================================
+ Hits 1870 1871 +1
- Misses 9386 9398 +12
Partials 191 191 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
We would like to let depositors register a date for physical sample when only the year or the
year and month is known and also accept Created and Updated as a date type.
Changes
YYYY-MM-DD.
format rule.
its format.
Return the date as a string value regardless of datatype.
Accept and display dates of any format.
and Updated in the date type dropdown.
Approval Checklist
Issue
Part of #41
Screenshots
After

Notes
Forked fom wip-feat-41-igsn-fix-draft