Comments

swarad07 created an issue. See original summary.

gaurav.goyal’s picture

Assigned: swarad07 » gaurav.goyal

Hey swarad07,

I am working on the logic part.

gaurav.goyal’s picture

Hey Swarad,

In Drupal 7 Version of the module, we are using `entity` concept. So in Drupal 8 version we can go with the same concept or we can go without entity concept.

My understanding about the functionality is:

  • Users can claim ownership of the node.
  • A mail is sent out to the admin (uid = 1) for every claim.
  • Admin has an interface (Integrated with view) for various operations on claim.
  • Admin has an interface (Integrated with view) for various operations on claim.
  • Integration with Trigger module - I think we will not integrate it because it is removed from Drupal 8 core (https://www.drupal.org/node/2116417)

I think there is really no need of using the entity concept over here. What do you think we should go with entity concept or not?

swarad07’s picture

Hi Gaurav,

There are two sets of functionality in this module,

1. Users can claim a node, we record in the backend who claimed what.
2. Admin gets emails of any claim.

#1 is a blocker to get the 8.x-dev release out. This is the core logic of the module. You are right that in D7 we have saved data as entities, I would like to keep it same for 8.x as well, feel free to suggest an alternative. It seems D8 has good support for Entity API, many things are in core now.

#2 is more like an alert system built around it. There are a couple of issues pending for 7.x where users have asked to turn off the alert as it spams the admin with emails for large sites. Instead, a simple listing page where admin can see the claims etc seems to be ideal, we can tie this page with permission string and then anyone with permission can view the claims, rather than only limited to admin.

But I would not worry too much about #2 at this point, even the integration with Trigger like you rightly pointed is not applicable for 8.x Maybe we can do Rules instead.

If we can get the main claim logic working, we can quickly consolidate and make a dev release available.

Thanks for helping out again. Let me know if there are any other doubts.

Thanks,
Swarad

gaurav.goyal’s picture

Thanks for quick reply Swarad.

Yep.. Correcting my old understanding :) With little more brainstorming I think using entities will make sense. I'm currently working on #1. Will try to roll out dev version ASAP.

gaurav.goyal’s picture

Status: Active » Needs review
StatusFileSize
new22.23 KB

Here is the first patch for claim logic. Below is the brief description about patch.

Patch Contains:

  • Permissions Defined.
  • New routes defined.
  • Nodeownership Claim as an Entity.
  • Views integration for base field values.

Things which are changed:

  • Now we are proceeding this using entity approach so I have removed install file and use basefielddefinition for schema.

Things remaining:

  • Admin listing of all nodeownership claims so that admin can take actions accordingly.
  • Implementation and views integrtion of Approve, Reject, Pending actions
  • VBO Integration
swarad07’s picture

Assigned: gaurav.goyal » swarad07

Thanks Gaurav. Will review and test it sometime over the weekend.

gaurav.goyal’s picture

StatusFileSize
new53.38 KB

Hi Swarad,

Logic part is ported. We will need some testing around it. Attached is the latest patch.

gaurav.goyal’s picture

We cannot integrate VBO at this point of time because it's not ported till now. - #1823572: Port Views Bulk Operations to Drupal 8

vyasamit2007’s picture

Assigned: swarad07 » vyasamit2007
Status: Needs review » Patch (to be ported)

The patch sent in #8 has been reviewed and tested. Ready to be ported in 8.x-1.x branch.

Thanks!!
~Amit

vyasamit2007’s picture

Status: Patch (to be ported) » Closed (fixed)
swarad07’s picture

Status: Closed (fixed) » Active

  • swarad07 committed f28e6f9 on 8.x-1.x
    Issue #2722065 by gaurav.goyal, swarad07, vyasamit2007: Port - Claim...
swarad07’s picture

Status: Active » Fixed

Thanks Gaurav for the patch.

Addressed a small formatting issue, as well as using this opportunity to give you a commit. :-)

gaurav.goyal’s picture

Thanks Swarad:) Now we can have a release for this module.

Status: Fixed » Closed (fixed)

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