Plans for a Checklist Extension

A Checklist Extension

I’m working on an extension to add checklists to the code review page! Checklists are really useful tools, as even the best of us can slip up on details when there’s zillions of things to think about. The B-17 Flying Fortress used a checklist to make it flyable. This extension will probably be used for the more modest goal of code convention reminders and catching common mistakes.

New Models/Tables

ChecklistItem

Fields:

  • Summary (CharField): A shorter description of what the checklist item is. Example: “Make sure variables are camel-cased
  • Details (TextField): A longer description in case the item needs more detail than can be fit in one line. Can be shown on mouseover as a tooltip: http://jqueryui.com/tooltip/
  • ForeignKey (GenericForeignKey): holds content_type and foreign_id, as described in http://stackoverflow.com/questions/881792/how-to-use-dynamic-foreignkey-in-django. content_type specifies whether the checklist item is associated with a user, a project (repository), or a team. On the review page, the query will grab all ChecklistItems associated with the team, the current project, and the current user.
  • Separate foreign keys (ForeignKey) to User, Group, Repository

ChecklistItemMarks

These remember checked items per review. They are updated when a draft is saved or a review is posted.

Fields:

  • Foreign key to user
  • Foreign key to the code review
  • Foreign key to the ChecklistItem
  • Checked? (BooleanField) indicates whether the item is checked or not

Screenshots/Mockups

As a dialog box which can be dragged or minimized (to not cover the code), or perhaps slide out from the edge of the page

ChecklistDialog

Added onto the review page (easy, but I think it’s useful to have the checklist visible while reviewing code)
ChecklistOnReview

Requirements

Allows teams and projects to have shared checklists: Yes, by associating ChecklistItems with foreign keys to teams and projects

Allows individual users to add custom items to their lists: Yes, by the foreign key pointing to users

The list should be light-weight in operation, and minimal in appearance so as to keep focus on the code being reviewed:  I like the dialog box thing, personally. Open to other designs too though.

Remember checked items per review (if I save a review draft, and log-in from another computer to continue, my checklist should remember what items I’ve already checked off): Yes, using ChecklistItemMarks

Remind the user if they try to publish a review with unchecked items on their list, in case they want to keep reviewing.: Will remember in implementation

Advertisements

One thought on “Plans for a Checklist Extension

  1. tester

    i downloaded and installed using ‘python setup.py install’ command. I enabled it from admin setting. but i am unable to see the checklist. Should the extension be downloaded to a specific localation? Should i copy in the folder structure to a specific location? your help will be much appriciated.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s