﻿ticket,summary,type,release,owner,status,created,modified,_description,_reporter
14141,Allow wiki-Syntax in scalar.py,enhancement,1.4,Ryan J Ollos,accepted,2022-05-30T11:06:46+02:00,2022-05-31T18:25:30+02:00,"Since r14524 it is not possible to include wiki-syntax to scalar-value output. For example, it is a nice feature to count the tickets of a user and point to the corresponding report:
{{{
{{{#!SQLScalar
SELECT '([query:?status=!closed&owner={{1}} '||count(id)||'],' FROM ticket WHERE status!=""closed"" AND owner=""{{1}}""
}}}
}}}

The previous behaviour can be restored with the following patch:

{{{
#!diff
diff --git a/scalar.py.orig b/scalar.py
index 0a9657a..037147c 100644
--- a/scalar.py.orig
+++ b/scalar.py
@@ -9,13 +9,12 @@
 #
 
 from trac.web.chrome import add_stylesheet
-from trac.wiki.formatter import system_message
+from trac.wiki.formatter import format_to_oneliner, system_message
 from trac.wiki.macros import WikiMacroBase
 from trac.util.html import html as tag
 from trac.util.text import exception_to_unicode
 from trac.util.translation import _
 
-
 class SQLScalar(WikiMacroBase):
     """"""Output a number from a scalar (1x1) SQL query.
 
@@ -39,5 +38,4 @@ class SQLScalar(WikiMacroBase):
         else:
             value = rows[0][0] if len(rows) else ""(NULL)""
 
-        add_stylesheet(formatter.req, 'wikitable/css/wikitable.css')
-        return tag.span(value, class_='wikiscalar')
+        return format_to_oneliner(self.env, formatter.context, value)
}}}",anonymous
14102,Compatibility with other plugins,enhancement,,,new,2021-12-20T16:28:23+01:00,2021-12-20T22:53:12+01:00,Change the table style and structure to be consistent with wiki table. So the table can be compatible with other plugins such as TableSorterPlugin.  ,anonymous
