Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Editing Ticket Fields

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


sbamford at dynamiccontrols

Dec 11, 2011, 4:21 PM

Post #1 of 5 (385 views)
Permalink
Editing Ticket Fields

Hi

I'm looking at writing a python script that will update a custom field
in our Trac tickets using information about our reviews on Review
Board.
I was planning on using a SQL script to edit the database, but I
wanted to know if there was a better way of doing it. I'd prefer to
have it as a script than as a plugin as that means that I can run one
program to get the information of Review Board and then upload it to
Trac.
However, I can't any good examples of scripts used to edit the Trac
database, and tickets in particular, and was hoping that someone would
either have example code or advice on how to achieve my goals.
Also, does anyone know how accurate this database visualisation is
(http://trac.edgewall.org/attachment/wiki/TracDev/DatabaseSchema/
db_trac_eng_final.png), and where our custom field would appear in it?
We are using Trac 0.12.2.

Thanks
Scott

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


itamarost at gmail

Dec 11, 2011, 11:44 PM

Post #2 of 5 (369 views)
Permalink
Re: Editing Ticket Fields [In reply to]

On Mon, Dec 12, 2011 at 2:21 AM, <sbamford [at] dynamiccontrols> wrote:

> Hi
>
> I'm looking at writing a python script that will update a custom field
> in our Trac tickets using information about our reviews on Review
> Board.
> I was planning on using a SQL script to edit the database, but I
> wanted to know if there was a better way of doing it. I'd prefer to
> have it as a script than as a plugin as that means that I can run one
> program to get the information of Review Board and then upload it to
> Trac.
> However, I can't any good examples of scripts used to edit the Trac
> database, and tickets in particular, and was hoping that someone would
> either have example code or advice on how to achieve my goals.
> Also, does anyone know how accurate this database visualisation is
> (http://trac.edgewall.org/attachment/wiki/TracDev/DatabaseSchema/
> db_trac_eng_final.png), and where our custom field would appear in it?
> We are using Trac 0.12.2.
>
> Thanks
> Scott
>

Hi Scott,

It's not recommended to modify the Trac DB directly from "outside".
I think that for your purpose you should take a look at the Trac XML RPC
Plugin [1].

- Itamar.

[1] http://trac-hacks.org/wiki/XmlRpcPlugin


>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To post to this group, send email to trac-users [at] googlegroups
> To unsubscribe from this group, send email to
> trac-users+unsubscribe [at] googlegroups
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


SBamford at dynamiccontrols

Dec 18, 2011, 12:56 PM

Post #3 of 5 (356 views)
Permalink
Re: Editing Ticket Fields [In reply to]

Hi Itamar

Thanks for that. Will this work with a python script directly or will I
have to write an extension to add what I want? I can't see how to get at
the API documentation without installing it.

Thanks
Scott



From: Itamar O <itamarost [at] gmail>
To: trac-users [at] googlegroups
Date: 12/12/2011 08:45 p.m.
Subject: Re: [Trac] Editing Ticket Fields
Sent by: trac-users [at] googlegroups



On Mon, Dec 12, 2011 at 2:21 AM, <sbamford [at] dynamiccontrols> wrote:
Hi

I'm looking at writing a python script that will update a custom field
in our Trac tickets using information about our reviews on Review
Board.
I was planning on using a SQL script to edit the database, but I
wanted to know if there was a better way of doing it. I'd prefer to
have it as a script than as a plugin as that means that I can run one
program to get the information of Review Board and then upload it to
Trac.
However, I can't any good examples of scripts used to edit the Trac
database, and tickets in particular, and was hoping that someone would
either have example code or advice on how to achieve my goals.
Also, does anyone know how accurate this database visualisation is
(http://trac.edgewall.org/attachment/wiki/TracDev/DatabaseSchema/
db_trac_eng_final.png), and where our custom field would appear in it?
We are using Trac 0.12.2.

Thanks
Scott



Hi Scott,

It's not recommended to modify the Trac DB directly from "outside".
I think that for your purpose you should take a look at the Trac XML RPC
Plugin [1].

- Itamar.

[1] http://trac-hacks.org/wiki/XmlRpcPlugin


--
You received this message because you are subscribed to the Google Groups
"Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to
trac-users+unsubscribe [at] googlegroups
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.


--
You received this message because you are subscribed to the Google Groups
"Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to
trac-users+unsubscribe [at] googlegroups
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.

Scott Bamford


tel:

fax:


www.dynamiccontrols.com
"Improving peoples lives with over 750,000 Shark Wheel Chair Controller Systems
deployed. Outstanding performance, reliability and safety (ISO 7176-14:2008/
ANSI/RESNA WC-2:2009).
http://www.dynamiccontrols.com/dealers/products/shark

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


itamarost at gmail

Dec 18, 2011, 1:09 PM

Post #4 of 5 (355 views)
Permalink
Re: Editing Ticket Fields [In reply to]

On Sun, Dec 18, 2011 at 10:56 PM, <SBamford [at] dynamiccontrols> wrote:

> Hi Itamar
>
> Thanks for that. Will this work with a python script directly or will I
> have to write an extension to add what I want? I can't see how to get at
> the API documentation without installing it.
>

You're welcome.
The XmlRpc Plugin can be used directly from Python script (you can see
examples in the plugin page).
I know you can edit ticket fields from script with this plugin, though I'm
not sure whether this works also for custom fields (I have never tried that
myself).


>
> Thanks
> Scott
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


oddsimons at gmail

Dec 18, 2011, 5:14 PM

Post #5 of 5 (355 views)
Permalink
Re: Editing Ticket Fields [In reply to]

On Dec 18, 10:09 pm, Itamar O <itamar...@gmail.com> wrote:
> On Sun, Dec 18, 2011 at 10:56 PM, <SBamf...@dynamiccontrols.com> wrote:
> > Hi Itamar
>
> > Thanks for that. Will this work with a python script directly or will I
> > have to write an extension to add what I want? I can't see how to get at
> > the API documentation without installing it.
>
> You're welcome.
> The XmlRpc Plugin can be used directly from Python script (you can see
> examples in the plugin page).
> I know you can edit ticket fields from script with this plugin, though I'm
> not sure whether this works also for custom fields (I have never tried that
> myself).

The docs are not available without installing. It used to be active at
Trac-Hacks.org so pointing to the docs was easy. Now the best
suggestion is pointing you to one of my semi-public projects that
publish the docs:

https://www.coderesort.com/p/open/rpc


:::simon

https://www.coderesort.com
http://trac-hacks.org/wiki/osimons

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.