Ticket #10 (new defect)

Opened 21 months ago

Created buckets not listed in control/buckets

Reported by: poswald Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

To get parkplace to display the buckets I crated I found I had to replace the sql:

control.rb

SELECT b.*, COUNT(c.id) AS total_children
               FROM parkplace_bits b LEFT JOIN parkplace_bits c 
                        ON c.parent_id = b.id
               WHERE b.parent_id IS NULL AND b.owner_id = ?
               GROUP BY b.id ORDER BY b.name

with this:

SELECT b.*, COUNT(c.id) AS total_children
               FROM parkplace_bits b LEFT JOIN parkplace_bits c 
                        ON c.parent_id = b.id
               WHERE b.parent_id = 0 AND b.owner_id = ?
               GROUP BY b.id ORDER BY b.name

I'm not super familiar with sqlite3 or why "IS NULL" would work for you when I need "= 0". I looked at the tables using sqlite3 and it does seem like there are 0's in there. Reading the sqlite3 documentation on NULLs seems to indicate they should be allowed. Should the form not be inserting a 0 in there when creating buckets?

Note: See TracTickets for help on using tickets.