It would be nice if the checkbox was a radio button with (at least) the following options:

-- Not done
-- Done
-- Will not do

"Will not do" should count the same as done for the completion percent calculation. An example use case is SEO Checklist. There are optional items, and even strongly recommended items, that I will not be doing in my sites. So without the above feature, my list will never show 100% complete.

Ideally, the API should allow modules to create their own options for the above, allowing for either checkbox or radio widgets as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TravisCarden’s picture

That's an interesting idea, @ExTexan. I had considered adding the ability for checklist implementations to declare items as optional, but at first blush I think I prefer letting end users make that decision instead like you suggest. I would ask two questions before complicating the UI:

  • Is there a benefit to making a discrete state for "will not do" since there's nothing stopping a user today from just checking off something that they don't intend to complete so they can report 100%?
  • If there is, how should that be represented on the reports page and in the progress bar on the checklists?

Also, what other states could a checklist need than "not done", "done", and "won't do"?

ExTexan’s picture

Hmmm. Good questions. I was, at first, thinking of this purely from the SEO Checklist point of view, but expanding my thinking now... let's see.

"n/a" comes to mind - similar to "won't do", I know, but slightly different meaning. Also, "Postponed" might be one someone would need.

I understand your point about how expanded options will complicate the reporting page(s). In the end, perhaps those three values are all that are really needed, with "won't do" being included in "100%" on all pages. After all, if someone selects that option just "so they can report 100%", who are they hurting other than themselves?

TravisCarden’s picture

I agree that three states would be adequate: done, undone, and ignored. However, I don't think that ignored items can just be counted as complete. A lot of users of this module give their clients access to the report page as a way of giving them insight into work progress, creating both visibility and accountability. If we give users the option to refuse to do tasks, stakeholders will want to know the difference between that and completed work. Therefore I think there would need to be a clear distinction wherever progress is depicted--i.e., on the checklists themselves and on the reports page. If a satisfactory UI is proposed, I would be willing to entertain the request.

ExTexan’s picture

I see. Good point. I wasn't aware of other use-cases for this module.

I'll take a look at the various pages and see if anything comes to mind.

ExTexan’s picture

Ok, here are my thoughts...

First, I think the three values should be:

--- N/A
--- Not Done
--- Done

"N/A" would suffice for "Won't Do" because, usually, the reason you won't do is because it doesn't apply in your case. Besides, it's shorter and (I think) looks better.

As for presentation, where you have the progress bar, that could be three colors... blue = done; light grey = N/A; white = not done. Or any colors, really. A color key just below would be nice.

As for the text in the vertical tabs on the left, looks like there's plenty of room for something like this...

2 done (40%); 1 N/A; 5 total

...or, better still, a smaller version of the 100% bar with the same color keys as above, with the numbers shown inside the bar itself. So, following my example, the blue part would show "(2)" inside it, the light grey would show "(1)", and the white would show "(2)".

ergonlogic’s picture

I agree that 'N/A' would be useful to allow for optional items. However, I don't think it'd be reasonable to allow just any task to be ignored. So, it'd be important that this be controlled in the checklist definition. That is, only tasks marked as optional get converted to radio buttons (or perhaps dependent checkboxes). Ideally, we could (optionally) specify the 'n/a' text in the definition, so we could add some explanatory text.

Another option reporting-wise, would be to simply remove the items marked 'n/a' from the calculations. For example, with a normal 5-task list, each would be worth 20% towards completion. If one were marked 'n/a', the remaining items would be weighed 25% each. I think this is a better representation of progress, since ignoring a task doesn't actually advance you towards completion. Of course, we'd still want to report the number of 'n/a' items, I just don't think they should count towards goal-completion.

ExTexan’s picture

Sounds good all around.

However, when you say, "...we'd still want to report the number of 'n/a' items..." are you talking about a separate page, so the user could see those items if they wish? Or do you mean that they would still be reported on the main progress page, just not contributing to the completion percent? If it's the latter, wouldn't that be a bit confusing (or misleading)? Following your example, if I see an entry with 5 items, and I've done 4, but it shows 100% - well, you see what I mean?

ergonlogic’s picture

Status: Active » Needs work
FileSize
6.12 KB

What I meant was that we should have something like "4 of 4 (100%, 1 ignored)". Or perhaps just have an 'ignored' column on the overview page.

Anyway, I've attached a first pass at this, showing the general concept. For incomplete tasks with an '#optional' element in the definition array, it'll display another checkbox, inset slightly and greyed out, with 'n/a' or custom text provided as the value of the '#optional' element. If the 'n/a' checkbox is checked, it'll display the task as crossed-out, and add an 'ignored' time-stamp similar to the 'completed' one. If task is checked 'complete', the ignore/optional checkbox won't be displayed.

It definitely still needs work, as the javascript isn't updating the tab sub-totals, nor are ignored items being subtracted from the overall title. But I figured I'd post this and get feedback before proceeding.

ergonlogic’s picture

Status: Needs work » Needs review
FileSize
10.67 KB

Here's a more complete implementation. The javascript now updates totals, and handles striking out ignored tasks, as well a hiding the 'n/a' checkbox when the task is marked complete.

Status: Needs review » Needs work

The last submitted patch, 9: checklistapi-optional_tasks-2137379-9.patch, failed testing.

TravisCarden’s picture

Status: Needs work » Closed (won't fix)

Closing for apparent lack of interest.