Wednesday, November 7, 2012

Trac 1.0

To modify the order of fields in Trac :
 
--- a/trunk/trac/usr-share-pyshared-trac-ticket-templates-ticket.html
+++ b/trunk/trac/usr-share-pyshared-trac-ticket-templates-ticket.html
@@ -266,5 +266,7 @@
                   </tr>
                 </py:if>
-                <tr py:for="row in group(fields, 2, lambda f: f.type != 'textarea')"
+
+                <!--! Do not show Remaining or Owner field when creating a ticket. -->
+                <tr py:for="row in group(filter(lambda f: ticket.exists or f.name != 'owner' and f.name != 'estimatedhours',fields), 2, lambda f: f.type != 'textarea')"
                     py:if="can_modify or can_create"
                     py:with="fullrow = len(row) == 1">
 
This code works fine in ticket create. but has problem when editing.
 
 

Tuesday, July 10, 2012

Enabling MSSQL in Ubuntu 8.04 and 10.04

There is no library for MS-SQL in Ubuntu PHP package. To enable support install php5-sysbase. The following command will install generic support for MSSQL (based on sybase):

aptitude install php5-sybase


mssql_init () and some other mssql functions are not working in the above package, so install MDB@ driver also :

pear install --nodeps MDB2_Driver_mssql