This module allows you to move comments and nodes around.

You can either

a) move comments below other comments on the same node
b) move comments to another node or comment
c) convert comments to a forum topic (or to any other node type)
d) convert nodes to comments with preserving data from the same field instances.

The children comments are always moving along with their parent entity.

Project link

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

Projects reviewed for review bonus

  1. #3410894: [1.0.x] Comment Notify Node Author
  2. #3469100: [1.0.x] Access By Taxonomy
  3. #3418413: [1.x] Configuration Batch Export
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

    lostcarpark created an issue. See original summary.

    vishal.kadam’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, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
    • For the time this application is open, only your commits are allowed.
    • 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 and no other user will be able to opt projects into security advisory policy.
    • 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.
    • 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

    Usually, after reviewing a project, we allow the developer to opt projects into security advisory coverage.

    This project is too small for us and it doesn't contain enough PHP code to really assess your skills as a developer.

    Have you created any other project on drupal.org (module, theme, distribution) we could instead review? The project needs to have most of the commits (preferable all the commits) done by you.

    lostcarpark’s picture

    Thanks for the quick response!

    I understand your difficulty. This project is quite small, but I think it's the size it needs to be (unless additional requirements come to light).

    Most of the projects I've been working on are either contributions to other peoples' modules, or modules I've taken over maintainership of.

    I developed the Advent Calendar module, but that is also very small. And I've been working on a D10 port of Comment Mover, which all the commits to the D10 version are by me, but I don't think it's ready for review, and it hasn't really moved forward in the last year.

    I don't mind waiting till I have a larger project ready to review, but I feel this project could be quite useful to many people using the new core Navigation, so would like to find a way to opt it in to security policy.

    Perhaps an alternative strategy would be to find a co-maintainer who already has permission to opt it in.

    avpaderno’s picture

    The Comment Mover module would be fine. I take you ported the code to Drupal 8+, so the commits from 2015 (or earlier) should not considered.
    It does not matter if it did not get commits in the past year. We just verify if you understand what the reviews say to change.

    lostcarpark’s picture

    Yes, all the commits to the 2.0.x branch of Comment Mover, which is the D8+ port, are mine.

    However, the project is already opted into the security policy.

    I'm not sure of the next steps. Do I switch the application to Comment Mover, or does the application remain for Navigation Extra Tools, but you take Comment Mover into consideration when reviewing?

    lostcarpark’s picture

    Status: Needs work » Needs review

    Hi,

    Setting to needs review as I'm not sure what I need to do next.

    Should I reframe the application on the Comment Mover module, or leave it on the Navigation Extra Tools, with Comment Mover as an added example?

    vishal.kadam’s picture

    Title: [1.0.x] Navigation Extra Tools » [2.0.x] Comment mover
    Issue summary: View changes
    vishal.kadam’s picture

    Status: Needs review » Needs work

    1. master is a wrong name for a branch. Release branch names always end with the literal .x as described in Release branches.

    2. FILE: comment_mover.module

    /**
     * @file
     * Primary module hooks for Comment Mover module.
     */

    Drupal does not have primary and secondary hooks. Instead of that, it is preferable to use the usual description: Hook implementations for the [module name] module. where [module name] is the name of the module given in its .info.yml file.

    /**
     * Implements hook_preprocess_HOOK().
     */
    function comment_mover_preprocess_node(&$variables) {

    The description for this hook should also say for which templates that hook is implemented.

    lostcarpark’s picture

    Status: Needs work » Needs review

    1. Master Branch

    The master branch was created in 2006, and seems to have last been updated with the D6 version of Comment Mover. Unfortunately it has a release, which I believe means it cannot be deleted.

    Please see conversation on Slack.

    2. comment_mover.module

    I have updated the @file comment:

    /**
     * @file
     * Enables adding cut and paste options to context menu for nodes and comments.
     */
    

    And the hook_preprocess_HOOK() comment:

    /**
     * Implements hook_preprocess_HOOK() for adding menu items to nodes.
     */
    

    Hope these are heading in the right direction.

    I've also updated the .gitlab-ci.yml to get tests running again, and fixed reported issues.

    vishal.kadam’s picture

    Rest looks fine to me.

    Let’s wait for other reviewers to take a look.

    lostcarpark’s picture

    Thanks, @vishal.kadam!

    lostcarpark’s picture

    Issue summary: View changes
    lostcarpark’s picture

    Issue summary: View changes
    lostcarpark’s picture

    Issue summary: View changes
    Issue tags: +PAreview: review bonus

    Three reviews completed for review bonus.

    rushikesh raval’s picture

    Priority: Normal » Major
    avpaderno’s picture

    Assigned: Unassigned » avpaderno
    Priority: Major » Normal
    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 the dedicated reviewers as well.

    avpaderno’s picture

    Status: Reviewed & tested by the community » Fixed
    avpaderno’s picture

    lostcarpark’s picture

    Thanks for the review!

    Status: Fixed » Closed (fixed)

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