Thank you
xml-rpc or try using one of those patches providing json-calls on top of
xml-rpc plugin.
--
Jani Tiainen
Good luck!
Eleonore
-----Message d'origine-----
De : trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] De la part de Aquaserver
Envoyé : vendredi 11 juillet 2008 10:54
À : trac-...@googlegroups.com
Objet : [Trac] add ticket with php page
Hello,
I would like to add ticket in trac without use trac interface.
I don't know if it's possible but I want to use php for do that.
I anyone have an idea :)
Thank you
I would ever access Trac database directly. (Exception to plugin that
creates own tables). There is lot of under hood logic that will get
bypassed if you access database directly. For example taking care of
change history, notifications etc.
--
Jani Tiainen
Nope, there is the XMLRPC plugin which should always be preferred over
hacking into the database directly.
Be careful when accessing the DB bypassing a Trac API: this is very
error prone, especially for character encoding issues: you may end up
setting invalid characters into the DB, which can become a true
nightmare to debug and fix.
Cheers,
Manu
+"n" ;-)
Cheers,
Manu
-----Message d'origine-----
De : trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] De la part de Jani Tiainen
Envoyé : vendredi 11 juillet 2008 11:44
À : trac-...@googlegroups.com
Objet : [Trac] Re: add ticket with php page
On 11 juil. 2008, at 11:40, Eleonore DUVELLE wrote:
>
> I know how to do it in Python, but not in PHP. Anyway, I think that
> the only way is to write directly in the database. This page might
> be of some help: http://trac.edgewall.org/wiki/TracDev/DatabaseSchema
> Maybe if you described more what you want I could give you some more
> info. Do you want to create tickets directly or export them from
> another soft?
>
> Good luck!
>
> Eleonore
>
>
> -----Message d'origine-----
> De : trac-...@googlegroups.com [mailto:trac-
> us...@googlegroups.com] De la part de Aquaserver
Consider the reverse way: if you can implement the same features with
XMLRPC, do not hack the database.
As I wrote, if you ever write a non-UTF-8 character in the DB, the
error may remain silent for weeks, and sometimes later prevent from
accessing a ticket or even prevent from running any report or query in
the future, for example.
Cheers
Manu
-----Message d'origine-----
De : trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] De la part de Emmanuel Blot
Envoyé : vendredi 11 juillet 2008 13:16
À : trac-...@googlegroups.com
Objet : [Trac] Re: add ticket with php page
Problems are much like modfying sqlite database directly as a binary
file not through sqlite libraries - it will work for a while. Schema
might change without notification since it's not intended to be modified
directly.
But what if DB schema changes? What if there is plugin that relies on
ITicketChangeListener interface?
All that get's bypassed. Also, you're bypassing lot of built-in
security. Trac is pretty secure against attacks since it's tested by
many, but how about yours?
So it is very preferable to use Trac API to manage Trac data. If you're
working with Python you can use Ticket API directly, but don't bypass it.
Like I wrote in the beginning, why are you using sqlite libraries to
access database. It's a binary file (format known). Why don't you write
and read it directly without any libraries?
This is the point - Using Trac API can make program work much longer and
with much more variety of environments.
Happy hacking.
--
Jani Tiainen
As it is surely better that doing it with pysqlite, I would be glad to do it this way.
As for your question :
" Like I wrote in the beginning, why are you using sqlite libraries to
access database. It's a binary file (format known). Why don't you write
and read it directly without any libraries?"
I simply didn't know there was another way to modify a database without SQLite. In fact, I'm quite new to programming so I guess there are a lot of things which seem clear to programmers but that I don't even know of.
Thanks for your answer,
Eleonore.
-----Message d'origine-----
De : trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] De la part de Jani Tiainen
Envoyé : vendredi 11 juillet 2008 19:42
À : trac-...@googlegroups.com
Objet : [Trac] Re: add ticket with php page
This is one of the very few things that is actually documented:
http://trac.edgewall.org/wiki/TracDev/DataModels
--Noah
-----Message d'origine-----
De : trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] De la part de Noah Kantrowitz
Envoyé : mardi 15 juillet 2008 09:36
À : trac-...@googlegroups.com
Objet : [Trac] Re: add ticket with php page
Eleonore DUVELLE wrote: