Needs work
Project:
Date
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2017 at 21:23 UTC
Updated:
18 Dec 2023 at 05:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rosk0test only patch.
Comment #4
rosk0Fixed test dependencies.
Comment #5
rosk0Not sure why new test wasn't run in previous comment.
I restored test dependency declaration, I thought that was changed but according to docs https://www.drupal.org/docs/7/testing/simpletest-testing-tutorial-drupal-7 its not. If I understood it correctly dependency on entity module would be picked up in next 24 hours(https://www.drupal.org/drupalorg/docs/drupal-ci/faq#dependencies).
I fixed expected value in the test - bad TZ.
Patch changes $type value passed to date_entity_metadata_struct_getter() from date_entity_metadata_field_getter() as later only called for fields configured NOT to have end date. In case field is configured to have end date date_entity_metadata_struct_getter() is called directly with type set to "struct" as expected.
Also patch adds another todo to the code base but I don't see any other way of fixing it without waiting for #1679552: DateObject::limitGranularity() doesn't work when passed array contains zeroes to be committed.
Comment #6
rosk0Improved patch version using date_granularity().
Comment #7
chris matthews commentedThe year old patch in #6 to date.module applied cleanly to the latest 7.x-2.x-dev. Is anyone able to confirm this issue is ready for RTBC?
Comment #9
steinmb commentedComment #10
rosk0Reroll.
Comment #11
steinmb commentedComment #12
megha_kundar commentedComment #13
steinmb commentedI think this should stay on the 7.x-2.x-dev branch.
Comment #14
steinmb commentedSorry, but the tests are also gone. Did you miss that?
Comment #15
megha_kundar commentedHi @steinmb,
I didn't find any test matching for version 7.x-3.x
Comment #16
steinmb commentedNot sure I follow. Look at the latest patch submitted in #10 - https://www.drupal.org/files/issues/2019-03-01/date-2921146-10.patch
is also contain tests for this part of the code making sure it stay fixed.
Comment #17
benjarlett commentedThanks for your work, but not quite working for me on 7.x-2.x-dev but maybe it's not for that version
patch -p1 < 2921146-12_0.patch
patching file date.info
Hunk #1 FAILED at 21.
Comment #18
damienmckennaPatches to .info files are always difficult because the version that's in the git repository is modified when you download it as either a packaged release or a dev snapshot. The only change in the info file is to list the new test file, so unless you need to run that test file you shouldn't worry about it.
Comment #19
damienmckennaI contacted Megha_kundar to see if it might be possible to get that patch file, hopefully it hasn't been lost as it has been a few months.
Comment #20
damienmckennaMegha emailed me to say she no longer has that file, so we'll unfortunately need new test coverage.
Comment #21
rosk0Re-roll of #10.
Test migrated from the new file into existing.
Also, we are using patch from #6 in production on a date heavy project since 2018.