def _updateRegistryStatistics(self, ztm): self.update('active_products', Product.select("active IS TRUE", distinct=True).count()) self.update( 'products_with_translations', Product.select(''' POTemplate.productseries = ProductSeries.id AND Product.id = ProductSeries.product AND Product.active = TRUE ''', clauseTables=['ProductSeries', 'POTemplate'], distinct=True).count()) self.update( 'products_with_blueprints', Product.select( "Specification.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['Specification']).count()) self.update( 'products_with_branches', Product.select( "Branch.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['Branch']).count()) self.update( 'products_with_bugs', Product.select( "BugTask.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['BugTask']).count()) self.update( 'products_with_questions', Product.select( "Question.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['Question']).count()) self.update( 'reviewed_products', Product.selectBy(project_reviewed=True, active=True).count())
def _updateRegistryStatistics(self, ztm): self.update( 'active_products', Product.select("active IS TRUE", distinct=True).count()) self.update( 'products_with_translations', Product.select(''' POTemplate.productseries = ProductSeries.id AND Product.id = ProductSeries.product AND Product.active = TRUE ''', clauseTables=['ProductSeries', 'POTemplate'], distinct=True).count()) self.update( 'products_with_blueprints', Product.select( "Specification.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['Specification']).count()) self.update( 'products_with_branches', Product.select( "Branch.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['Branch']).count()) self.update( 'products_with_bugs', Product.select( "BugTask.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['BugTask']).count()) self.update( 'products_with_questions', Product.select( "Question.product=Product.id AND Product.active IS TRUE", distinct=True, clauseTables=['Question']).count()) self.update( 'reviewed_products', Product.selectBy(project_reviewed=True, active=True).count())