Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
Swish Offline
New Member
 
Posts: 11
Join Date: Oct 2005
Knowledgebase - number of articles count - 23-11-2005, 11:54 PM

When you look at the categories within the knowledgebase, it shows the number of articles in that category next to the Category Title.

Problem is that it doesn't actually show the TOTAL number of articles under that category if there are subcategories.

I will give you an example.

Parent Category: Web Hosting (0) - shows zero articles
---Sub-Category: FTP (5) - has 5 articles directly under FTP
---Sub-Category: E-Mail (20) - has 20 articles directly under
---Sub-Category: Control Panels (0) - shows zero articles, but there are sub-sub categories.
------Sub-Sub-Category: cPanel (15)
------Sub-Sub-Category: Helm (10)

So looking at the example above, the Top Parent Category should show as (50) articles ... but it shows as (0), Customers therefore think there is nothing in there. This also goes for the Control Panels category which has sub-categories.

How do we get the Parent Categories to show the TOTAL number or articles under it including all sub categories ... this is a very annoying problem.


Swish Connect Pty Ltd
www.swishconnect.com.au
Web Hosting | Domain Names | Web Development | e-Commerce | $39 .com.au/.net.au domains
   
Reply With Quote
  (#2) Old
Cheetah Offline
New Member
 
Cheetah's Avatar
 
Posts: 5
Join Date: Feb 2005
24-11-2005, 04:39 AM

We have the same problem and also with download category's
   
Reply With Quote
  (#3) Old
Swish Offline
New Member
 
Posts: 11
Join Date: Oct 2005
24-11-2005, 07:15 AM

I just wonder if this is a bug or just poorly thought out.


Swish Connect Pty Ltd
www.swishconnect.com.au
Web Hosting | Domain Names | Web Development | e-Commerce | $39 .com.au/.net.au domains
   
Reply With Quote
  (#4) Old
ECHEVA Offline
New Member
 
Posts: 1
Join Date: Nov 2005
24-11-2005, 10:45 AM

It looks really a problem!
The solution I suggest you meanwhile they try to solve the problem is to add all the articles to the parent category in order to have it counting all of them.
I know it is not the right solution but at least it can save you for the moment.
Sorry if you think it was an stupid idea.
Regards
Pablo
   
Reply With Quote
  (#5) Old
jonathanjab Offline
Member
 
Posts: 39
Join Date: Oct 2005
Location: Cardiff, UK
24-11-2005, 10:57 PM

I have submitted a bit (with a patch) which corrects this (http://bugs.kayako.net/index.php?do=details&id=1007).

Using the second patch, it not only counts just public (no draft or private) articles, it also counts ALL subcategories, and even better - it only counts unique articles, so if you have an article in two different (sub) child categories of a parent category it will only be counted once.

I have is running on the test-version of my site which is due to go live in the next few days or so. Seams to be working fine.


Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting and Reseller Hosting from JAB Web Solutions

   
Reply With Quote
  (#6) Old
Ara Offline
New Member
 
Posts: 18
Join Date: Sep 2005
25-11-2005, 05:42 AM

same problem here with downloads
   
Reply With Quote
  (#7) Old
Swish Offline
New Member
 
Posts: 11
Join Date: Oct 2005
25-11-2005, 07:35 AM

does Varun know about this ... is there a plan to fix it?


Swish Connect Pty Ltd
www.swishconnect.com.au
Web Hosting | Domain Names | Web Development | e-Commerce | $39 .com.au/.net.au domains
   
Reply With Quote
  (#8) Old
jonathanjab Offline
Member
 
Posts: 39
Join Date: Oct 2005
Location: Cardiff, UK
25-11-2005, 09:18 AM

Must admit, I haven't thought about the Download section - we only have a very simple one at the moment. I'll look into 'porting' the changes to the Download section as well and see what I can come up with. Should have something in the next day-or-so.


Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting and Reseller Hosting from JAB Web Solutions

   
Reply With Quote
  (#9) Old
Ara Offline
New Member
 
Posts: 18
Join Date: Sep 2005
25-11-2005, 07:48 PM

Download section has the exact problem. I asked a while back and somebody suggested removing the tag but it is not the answer. Submitted a ticket and I was told it should be fixed in 3.0.26 so I dared to run the cvs and still no go. Even kayako’s own site has the problem. Check http://support.kayako.net/index.php?...nloads&_a=view
   
Reply With Quote
  (#10) Old
jonathanjab Offline
Member
 
Posts: 39
Join Date: Oct 2005
Location: Cardiff, UK
25-11-2005, 08:36 PM

Actually, the initial problem (if it's the same as the Knowledgebase section) is that the recursive section of the code isn't being totalled correctly.

The code goes:

count 0 // i.e. start from the root category

with count being (sorry about the bad formatting):

count cat {
number = articles in cat
foreach subcat under cat {
total = number + count subcat
}
database set cat to total
return total
}

The problem is that it will only add the last-searched subcategory to the number of articles in the current section (subcategories searchs in descending sort order). It should be:

count cat {
total = articles in cat
foreach subcat under cat {
total += count subcat
}
database set cat to total
return total
}

to make sure all sub categories are added.

What I've done with the KB code is

count cat {
array = []
foreach subcat under cat {
subarray = count subcat
foreach id in subarray {
add id to array if id not in array
} }
list = [list of article id's in cat]
foreach id in list {
add id to array if id not in array
}
database set cat to length of list
return array
}

This way the code goes deep-first and only adds articles to the array if it they don't exist - no matter where the article exists below the sub category, it will not be added again if it's in another sub-category below that being counted.

I'll try and sort out a patch for the download section now.


Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting and Reseller Hosting from JAB Web Solutions


Last edited by jonathanjab; 26-11-2005 at 12:34 AM.. Reason: Formatting correction
   
Reply With Quote
  (#11) Old
jonathanjab Offline
Member
 
Posts: 39
Join Date: Oct 2005
Location: Cardiff, UK
25-11-2005, 11:26 PM

OK. I've finished the update and attached the two patches - one for the knowledgebase system and the other for the download section.

In the end, the download section doesn't need to be as complete - after all, a download can only exist in one section and a section can only have one parent, so there's no need to do the track for unique downloads.

I've also updated the knowledgebase section aswell - there were a few mistakes in the original which I've corrected.

I've tested both updates on my test server (copy of the website on our internal lan) and they're now live on the main website.

I'll add both of these patches to Flyspray now aswell. Hopefully they'll be included soon.
Attached Files
File Type: txt 05-knowledgebase_published.txt (2.8 KB, 340 views)
File Type: txt 06-downloads_counter.txt (3.6 KB, 311 views)


Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting and Reseller Hosting from JAB Web Solutions

   
Reply With Quote
  (#12) Old
c-wex Offline
Member
 
Posts: 35
Join Date: Nov 2005
25-11-2005, 11:30 PM

Hello sir.

Will theese patches be official patches ???
   
Reply With Quote
  (#13) Old
jonathanjab Offline
Member
 
Posts: 39
Join Date: Oct 2005
Location: Cardiff, UK
26-11-2005, 12:32 AM

Absolutley no idea - that's upto Kayako. All I've done is fix the issue for my own site. I had originally attached them to Flyspray, but as a few people have noticed/complained about the why SupportSuite counts I'm offering them for those that would like them.

At the end of the day, if you don't know what you're doing, it's not a good idea to be playing around with them and it upto the staff here to decide if they should be included.

BTW, these are patches against the 3.00.26 CVS (14th November), although they'll probably work with most recent released (untested!!).


Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting and Reseller Hosting from JAB Web Solutions

   
Reply With Quote
  (#14) Old
c-wex Offline
Member
 
Posts: 35
Join Date: Nov 2005
26-11-2005, 12:34 AM

Hehe .. I don't know what I'm doing ;-)

Anyway i think it would be cool to know what flyspray is and how to implement the patches
   
Reply With Quote
  (#15) Old
jonathanjab Offline
Member
 
Posts: 39
Join Date: Oct 2005
Location: Cardiff, UK
26-11-2005, 12:37 AM

Flyspray is the bug-tracking software kayako uses (http://bugs.kayako.net/index.php) the bug in question is http://bugs.kayako.net/index.php?do=details&id=1007

As for the patches, if you really want to know (BTW, this is for *nix systems - I don't know if the patch system is available in Windows):

cd /path/to/supportsuite
patch -p1 --dry-run -i /path/to/patch

If there are no problems, you can remove --dry-run and the changes will be made to the file.


Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting and Reseller Hosting from JAB Web Solutions

   
Reply With Quote
Reply

Tags
articles, count, knowledgebase, number

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I list more than 3 Popular Knowledgebase Articles? MoleEnd How do I? 3 12-05-2007 08:58 AM
All template groups' knowledgebase articles included in IRS - problem steveparks SupportSuite, eSupport and LiveResponse 16 25-10-2006 02:41 AM
change the size number count in knowledgebase disenioweb Developers & Code 5 15-09-2006 12:44 PM



Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Help desk software by Kayako.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48