Here is my "blue skies and apple pie", "anything is possible" wish list for Checklist API, in no particular order:

Generally, I want to move away from checklists being defined in application code and move toward making them (exportable) configuration that site admin's can create. I want to retain the ability to have "global" checklists, but I think that needs to be one use cases of a more flexible architecture. I kind of see the evolution here as akin to the custom modules > CCK > Fields in Core progression. Checklist API is currently in the "you have to hire a developer" phase. The next logical step is the "install this module and then log into your Drupal site and do it yourself" phase.

CommentFileSizeAuthor
#3 new_checklist.png16.24 KBanavarre
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ergonlogic’s picture

I think the most effective way to accomplish this is by moving to entities. That is, define a 'checklist' entity-type, with custom fields for checklist items, completion time-stamps, and other options. Presumably, we could leverage existing fields for more standard things like titles, descriptions, field groups, etc.

Entity bundles would then represent a given defined checklist (e.g QA checklist), which via Entity API (for D7) can be exported. Entity API also provides built-in Views and Rules support, and an admin UI. Attaching checklists as fields would presumably be simpler than is currently in #2056411: Attach checklists to entities as fields, as we shouldn't have to handle saving/loading them ourselves.

I really like the existing checklist alter hook. We should try to ensure that Features Override, or some other solution can provide us with similar capabilities.

This should satisfy all the features listed above (except the 8.x upgrade). However, since all this is a major API change, I would suggest moving it 7.x-2.x and 8.x-2.x branches.

TravisCarden’s picture

That sounds very much in line with my thinking, @ergonlogic. Here are a couple of use cases to help us flush out requirements:

  1. SEO Checklist - By far the biggest consumer of the API right now is SEO Checklist module, so it's use case needs to be accounted for. That is, a single form with a single checklist for the whole site that's filled out once for all users. Perhaps under the hood this looks like a checklist entity and a page View exported to code. Either one could be tweaked or overridden using Features Overrides. Or perhaps checklists should optionally get an entity path with built-in permissions and display.
  2. A per-node editorial checklist - In this scenario, the client wants to attach to each node a checklist of editorial tasks that must be performed on said node before or once published, and see a report of nodes with incomplete checklists. In terms of implementation, I could see this being a checklist entity attached as a field to blog post nodes that gets hidden on the default display mode so it's not visible to visitors. Then it's exposed on a tab along side the node "View" page using Views. The administrative dashboard would also be a View. This could be done as an ad hoc solution or exported as a Feature and distributed as a contrib project. In the latter case, there would be some end user configuration involved and some Features overriding to figure out.

Does that sound right? We might also consider things like making the progress bar a field formatter on a "percent complete" (faux) field to allow end users to craft the interface. Lots of possibilities. We'll definitely want to hammer out requirements the rest of the way before we jump into implementation! I'll see if I can get some feedback from Ben Finklea at Volacci, who maintains the SEO Checklist module.

Another thing I thought of: I wonder if we should consider arbitrary nesting? I have found two levels (categories with task items under them) restricting at times. I'd like to know whether other people have felt the same way, such that it should be considered, or if that would be needlessly complicating things at this point.

I like the alter hook, too, although I'm not aware of any contrib projects making use of it yet, and I haven't heard from anybody else who is. Do you use it?

anavarre’s picture

FileSize
16.24 KB

I've been looking into the Checklist API implementation and how the PASC and QA checklists pile up. What's your opinion about the following?

At admin/config/development/ you seem to have direct access to any checklist that has been created. If you do end up with many checklists (who knows the complex use cases people can sometimes have...) I wonder if only having them under admin/reports/checklistapi instead would be okay from a UX POV? Seems like this would thus be very straightforward to have any number of predefined checklists (PASC, QA, SEO, your own...) and a button for adding any custom checklist that you would want to create there. Here's a sample mockup:

Add a new custom checklist

I'm strongly advocating too for a fieldable entity structure to move away from checklists in code and allow site builders to create their own checklists. With CMI in D8, this is even more easy to achieve as enabling the module could simply copy over predefined YAML configuration files (under config/) without writing any line of code.

Oh, and FWIW I also really like the idea of having a per-node editorial checklist, too.

TravisCarden’s picture

At admin/config/development/ you seem to have direct access to any checklist that has been created.

That's not actually the case, @anavarre. You can put your checklists at any path you like using the #path element in hook_checklistapi_checklist_info(). In D7, a menu link will be automatically created for you at that path. In D8, even that is optional. I'm definitely onboard with everything else you say. :)

freelock’s picture

Hi,

Just stumbled across this module, which looks like a great starting point for what we're trying to do - streamline maintenance across a bunch of sites. In addition to the two user scenarios discussed, which I think are great, what I'm looking for is quite a bit more complex -- the ability to manage collections of checklists.

We would use this in a project management site (OpenAtrium), not on the individual sites. So what I'm looking to do is have essentially an object-oriented, inherited model for checklists.

For example, we might have these base checklist "bundles":

- Launch checklist
- Monthly Maintenance checklist
- Site assessment checklist
- Theme builder's checklist

Those would have a base set of tasks/checkboxes for all descendent checklists, all sites.

When adding a new customer, we might need to tailor the checklists, adding some items that are specific to that site. In particular, a monthly checklist we would add a new node, with a new copy of the checklist, that should have the site-specific version of the checklist with some items added and other removed from the base checklist, but the same set of items as were in the previous month...

... and then to take that one step further, if we add an item to the base monthly maintenance checklist, have that item appear on all new checklists for all the sites...

Does that make sense? Have not tried out the module yet to see if the data model will support this type of scenario, but I thought I would add this as a hugely desirable feature. And if appropriate, we might be willing to contribute some development towards this.

TravisCarden’s picture

Thanks for the feedback, @freelock! I haven't taken the time to analyze everything here, but three major architectural approaches come to mind to address some of the requirements proposed. All of them assume that checklists become some sort of entity created via the UI.

  • Checklists are webform-like content entities. Checklist structure is defined per-entity. Checklists can be duplicated by entity cloning to achieve recurring checklists or checklists-per-node.
  • Checklists are like nodes. Checklist structure is defined per bundle. New instances of a given checklist are created much as nodes of a given content type are created today. Recurring checklists are just instances of a given bundle. Checklists can be attached to nodes via entity reference fields.
  • Checklists are fields. They're attached to nodes, users, or other entities. New instances of a given checklist are created by creating a new node (or entity) with the checklist field on it. Permissioning and display control comes from the field system. The problem of recurrence is transferred to the node system. Checklists-per-node is handled automatically.

I'd love people's thoughts.

TravisCarden’s picture

Category: Task » Plan
freelock’s picture

Hi, Travis,

Ok, I've started commenting on this architecture discussion twice, in two completely different directions... what a thorny data modeling challenge!

Scrapping all that, two thoughts:

1. I'd like something integrated with Paragraphs module, so I can pull a checklist into a document structure wherever I want it. OpenAtrium has done some cool things with custom Paragraph bundles -- snippets, related content -- that might provide some good models.

2. I think when it comes down to it, however we choose to store it in the back end, I'm seeing the need for two different classes of objects here: a "template" checklist, and a checklist "instance". The thing is, every checklist "instance" may end up entirely unique, and should be possible to edit/change well beyond the original template. And I would want to be able to define different behaviors linking templates with instances -- e.g. when I add an item to this template, (add/do not add) this item to all (existing/only new) checklists based on this template (also need to consider updates and delete).

Not sure how to take it from there, just getting down some further thoughts...

Cheers,
John

Chris Charlton’s picture

I'd use a Template-Instance setup. Not saying it's easy to build, but sounded good.

m.stenta’s picture

+1 for checklists as entities. This issue outlines the use-case I am working towards (as well as integration with the Log record keeping module): #2876152: Integrate with Log module

I'm a bit on the fence about whether they should be content entities (fieldable) or config entities (not fieldable), however. In my case I will need to create pre-defined checklists that will be the same across hundreds of sites. I could use some kind of content export/import to achieve that, but config entities already work the way I need.

And with checklists available as fields (#2056411: Attach checklists to entities as fields) they could be added to content entities (ie: nodes), while referencing the underlying checklist config entity. If we integrate with the Log module, and create Log entities when checklist items are checked off, then we could offload the storage of date and "done/not done" to that module instead of storing it in this module.

So: Checklists would be config entities, there would be a "Checklist" field type that could be added to content entities which references a specific checklist config entity and displays it when you are viewing the content entity, and when you check items off as "done" it creates Log entities in the background (and links them to the content entity via a reference table so that you can click through to them for more details).

Maybe that's a bit off on a new tangent... just throwing some ideas out there... what do you think?

m.stenta’s picture

Ah on second read-through I think I understand @ergonlogic's suggestion for a checklist content entity a bit better. Each bundle would define the individual checklist items as fields, so the bundle config could be exported and shared across sites. That would work for me!

How would the fields themselves work? Would they be a new field type? I haven't reviewed #2056411: Attach checklists to entities as fields, but would it be different from that?

TravisCarden’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
vuil’s picture

Title: [meta] Roadmap » [META] Roadmap
Version: 8.x-1.x-dev » 2.0.x-dev