Query regarding 20120421_Performance_Enhancement.sql

Topics: Core
Jul 3, 2012 at 12:19 PM

Having built the latest source code and applied the database changes I'm seeing an issue around the category count on the Roadmap. It is zero for all categories for the two projects we have currently running in Bugnet.

Looking at the 20120421_Performance_Enhancement.sql I can see the following line below repeated in four places  (line no's 398, 429, 459, 523) within the sql

Select Count(*) FROM BugNet_IssuesView where IssueCategoryId = c.CategoryId and c.ProjectId = 96 and [Disabled] = 0 and IsClosed = 0 AS IssueCount

Should this not be the variable @ProjectId instead of this hardcoded value of 96??

 

 

Jul 3, 2012 at 1:55 PM

Good catch.  You are correct , the script should use the variables instead of the hardcoded value of 96.  Thanks.

Jul 3, 2012 at 2:42 PM

Whoops, guess my "find and replace" didn't work all that well. :D

Jul 3, 2012 at 6:27 PM

I have updated the script and commited the change.

Jul 4, 2012 at 9:30 AM

I tried out the script again, you will have to make two changes in the following Procs in the SQL

CREATE PROCEDURE [BugNet_ProjectCategories_GetChildCategoriesByCategoryId]

CREATE

PROCEDURE [BugNet_ProjectCategories_GetCategoryById]

 

 

 The Project Id is not defined so the following line needs to be added

@ProjectId int

Jul 4, 2012 at 5:48 PM

You're right, I'll take another look.  I don't think the project id is necessary if we have the category id , since they are unique.

Jul 5, 2012 at 9:15 AM

When I parsed the SQl before running it complained so I put it in the first procedure and when I parsed it again it complained about the 2nd procedure so had to put it in there as well. Once that was done it ran successfully.