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

Migrate process plugin to adjust date values to 11:59pm #46

Merged
merged 1 commit into from Jan 10, 2022

Conversation

pookmish
Copy link
Contributor

@pookmish pookmish commented Jan 6, 2022

READY FOR REVIEW

Summary

  • Process plugin to convert equal values or midnight values to 11:59pm values.

Need Review By (Date)

  • 1/20/22

Urgency

  • medium

Steps to Test

  1. checkout this branch and the branch in Adjust localist end dates for Smart Date "All Day" stanford_profile#474
  2. import configs
  3. import some events from localist. I used the department "Department of Art & Art History"
  4. view one of the nodes
  5. validate the date values are checked as "All Day"

See Also

Copy link
Collaborator

@imonroe imonroe left a comment

Choose a reason for hiding this comment

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

Tested in conjunction with SU-SWS/stanford_profile#474. Works as described. Includes a test which passes. Only one small nitpick with a redundant check, other than that, good to go.

* {@inheritdoc}
*/
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (empty($this->configuration['start_time'])) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This check is redundant since we're checking the exact same thing just below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This checks if if start_time is even populated with a value. this prevents a php warning like Undefined index in the following lines, so though it appears redundant, it reduces warning messages.

@pookmish pookmish merged commit eb16c05 into 8.x-1.x Jan 10, 2022
@pookmish pookmish deleted the smartdate-adjustment branch January 10, 2022 19:27
pookmish added a commit that referenced this pull request Jan 28, 2022
- Fixed the orphan action to compare string and interger values
- D8CORE-5193 Add "Forget" orphan action (#47)
- Migrate process plugin to adjust date values to 11:59pm (#46)
- Deny field access to imported fields on nodes (#44)
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.

None yet

2 participants