Matters Module

From PikaDocs

In a nutshell, this is a customization to make matters work like cases instead of keeping them in the activities table. This customization was developed for Legal Services Lawline of Vermont with funds from a TIG grant from LSC. We are of course required to make the code available to other legal services organizations, and we hope that this implementation of Matters makes it into mainstream Pika releases.


Table of contents

Table Structure

Add this to your cases table:

`matter_flag` tinyint(4) default '0',


New files

(to be filled in...)

add a redirect to modules/case_screen.php

In modules/case_screen.php, add this code at the top of the file:

// code from Dave Kuchler, pasted in by Andrew Cameron 2006/4/27
//will check to see if the item that's being loaded is a matter, and  redirect to matter.php instead.
if ($case_row['matter_flag'] == 1) {
         header("Location: matter.php?case_id=$case_id");
}

This code comes in handy when you click on a matter from the calendar screen, for instance. That would normally pull up case.php even though you are looking at a matter. It results in data not being present on screen and tons of red flags. This handy redirect kicks you over to the matter.php screen.

Reports

  • Existing case reports have to be altered to look for matter_flag != 1 (this will take alot of work to fix existing reports, and tell people using MegaReport to include this new condition)
  • LSC Other Matters report needs to be rewritten. (Not done yet, but once we have it we'll share it)

Converting Matters from the old way to this structure

  • I.e. getting them out of activities and into Cases. Ugh...not sure how this will work.
  • Then remove all your links to "LSC Other Matters"

original entry by Andrew Cameron
Legal Services Lawline of Vermont (http://www.lawlinevt.org/) and Vermont Legal Aid (http://www.vtlegalaid.org/)