The Partial Datelist module allows site administrators to customize the visibility of Date field's Select list widget by deactivating individual parts of the date and date/time field types (e.g., year, month, day, hour, minute, second). This is particularly useful for scenarios where only specific parts of a date or time need to be collected (e.g. year only, or year/month). The module affects both the Date and Date Range fields.

Project link

https://www.drupal.org/project/partial_datelist

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    mabho created an issue. See original summary.

    mabho’s picture

    Status: Needs work » Needs review
    avpaderno’s picture

    Thank you for applying!

    Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

    The important notes are the following.

    • If you have not done it yet, enable GitLab CI for the project, and fix what reported from the phpcs job. This help to fix most of what reviewers would report.
    • For the time this application is open, only your commits are allowed. No other people, including other maintainers/co-maintainers can make commits.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application.
    • Nobody else will get the permission to opt projects into security advisory policy. If there are other maintainers/co-maintainers who will to get that permission, they need to apply with a different module.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    To the reviewers

    Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.

    The important notes are the following.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool only once per application. The configuration used for these tools needs to be the same configuration used by GitLab CI, stored in the GitLab Templates repository.
    • It may be best to have the applicant fix things before further review.

    For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.

    vishal.kadam’s picture

    Status: Needs review » Needs work

    1. feature/add-module-tests and main are wrong names for a branch. Release branch names always end with the literal .x as described in Release branches. The only exception is for the main branch, which is actually not fully supported on drupal.org and should be avoided.

    2. FILE: README.md

    The README file is missing the required section - Requirements.

    mabho’s picture

    @avpaderno,

    This module contains only code I have written. GitLab CI is enabled and the code passed validation.

    @vishal.kadam,

    Thank you for the quick response here, I will review your requests and get back to you once it is ready.

    mabho’s picture

    Changes are now ready.

    I removed branches main and feature/add-module-tests. Here is the updated list of branches in the codebase:
    https://git.drupalcode.org/project/partial_datelist/-/branches

    Here is the merge request to incorporate the changes you requested in the README.md:
    https://git.drupalcode.org/project/partial_datelist/-/merge_requests/9

    I am also incorporating a .gitignore file to the codebase.

    I have this open thread where I plan to apply your change requests:
    https://www.drupal.org/project/partial_datelist/issues/3525354

    mabho’s picture

    Status: Needs work » Needs review
    vishal.kadam’s picture

    Status: Needs review » Needs work

    The reported changes should be committed directly to the project repository. Please note that we do not review merge requests.

    Also, there's no need to create an issue thread in your module project, as this is already being tracked here.

    mabho’s picture

    @vishal.kadam,

    Ok, done, I merged the changes in the issue queue into the main branch (1.0.x). It is ready for your review now.

    Many thanks

    vishal.kadam’s picture

    Status: Needs work » Needs review
    vishal.kadam’s picture

    Rest seems fine to me.

    Let’s wait for other reviewers and Code Review Administrator to take a look and if everything goes fine, you will get the role.

    avpaderno’s picture

    Status: Needs review » Needs work
    • The following points are just a start and don't necessarily encompass all of the changes that may be necessary
    • A specific point may just be an example and may apply in other places
    • A review is about code that does not follow the coding standards, contains possible security issue, or does not correctly use the Drupal API
    • The single review points are not ordered, not even by importance

    src/Hook/PartialDatelistHooks.php

    class PartialDatelistHooks {
    
      use \Drupal\Core\StringTranslation\StringTranslationTrait;
    
    

    When using traits, use Drupal\Core\StringTranslation\StringTranslationTrait; is placed on the top of the file using the trait, and use StringTranslationTrait; is used inside the class.

      /**
       * Implements hook_help().
       *
       * @param Drupal\Core\Field\WidgetInterface $plugin
       *   The field widget plugin.
       * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
       *   The field definition.
       * @param string $form_mode
       *   The form mode.
       * @param array $form
       *   The form array.
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       *   The form state object.
       *
       * @return array
       *   A render array for the help page.
       */
      #[Hook('field_widget_third_party_settings_form')]
      public function fieldWidgetThirdPartySettingsForm(WidgetInterface $plugin, FieldDefinitionInterface $field_definition, $form_mode, array $form, FormStateInterface $form_state) {
    

    The short description is for the wrong hook. Hooks do not require their parameters are described.

    vishal.kadam’s picture

    Priority: Normal » Minor

    I am changing priority as per Issue priorities.

    mabho’s picture

    Hey, @avpaderno, thank you very much for the review. I just updated my main branch (1.0.x) with the changes you requested. I ran some additional checks and fixed an issue with some function names in the procedural portion of the code (partial_datelist.module).

    Let me know if I can provide any further information.

    vishal.kadam’s picture

    Remember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.

    mabho’s picture

    Status: Needs work » Needs review

    @vishal.kadam, thank you for reminding me of the status change.

    avpaderno’s picture

    Assigned: Unassigned » avpaderno
    Status: Needs review » Reviewed & tested by the community

    Thank you for your contribution and for your patience with the review process!

    I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.

    These are some recommended readings to help you with maintainership:

    You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
    Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

    I thank also all the reviewers for helping with these applications.

    avpaderno’s picture

    Priority: Minor » Normal
    Status: Reviewed & tested by the community » Fixed

    Now that this issue is closed, review the contribution record.

    As a contributor, attribute any organization that helped you, or if you volunteered your own time.

    Maintainers, credit people who helped resolve this issue.

    mabho’s picture

    Thank you so much, @avpaderno. I am glad to learn I acquired the new status. I will go over the provided links, and will check the list of projects with pending reviews to see how I can help.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.