Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

Lighthouse Pro
Project Home Known Issues Screenshots Contact Project

Lighthouse Pro Issue: Deleting projects does not delete issue attachments

Name: Deleting projects does not delete issue attachments
ID: 170
Project: Lighthouse Pro
Type: Bug
Area: Database
Severity: High
Status: Fixed
Related URL: http://localhost.railo/lighthousepro/index.cfm?event=page.projects
Creator: Sebastiaan van Dijk
Created: 07/20/12 8:10 AM
Updated: 07/23/12 7:51 AM
Description: When deleting a project all related issues are deleted. But alas not the attachments associated with the issues. This means that when deleting projects you'll get a lot of orphaned database records with no associated issues (or rather, the issues which no longer exist, as they were just deleted!). As there is no way to administer the attachments separately visually, this will lead to database pollution and inconsistencies. There's always the possibility to write something myself (a CFM-file I can run after each project delete), but I think this should be a "feature" of LHP ;-)
History: Created by sebgmc (Sebastiaan van Dijk) : 07/20/12 8:10 AM

Comment by sebgmc (Sebastiaan van Dijk) : 07/22/12 1:53 AM
Hi Raymond,
Something like this?
/* get all issues within chosen project with attachments */
<cfparam name="attributes.Id" default="99557417-4F77-4475-B92CE24ADD32D82C">
<cfquery name="getIssueAttachments" datasource="c1lighthousepro">
   select lha.filename
   from lh_attachments lha
      left outer join lh_issues lhi
         on lhi.Id = lha.issueidfk
   where lhi.projectidfk = <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.Id#" maxlength="35" />
</cfquery>
<cfdump var="#getIssueAttachments#">

Comment by sebgmc (Sebastiaan van Dijk) : 07/22/12 3:00 AM
Raymond, sent you a file in which I have created logic and queries to clean up a LHP database after having deleted a project. Ideally this would be incorporated into the LHP logic itself ;-)
Unsure if users that become orphaned after a project is deleted also should be deleted...

Updated by cfjedimaster (Raymond Camden) : 07/23/12 7:51 AM
Fixed - thanks. (To be released in about 10 minutes.)

To add a comment to this bug, please login using the link above.