Mailing List Archive

Howto view (multiple) changesets re a ticket
Hi,

just started evaluating Trac. Seems pretty good so far, but there is one thing
missing (?) I really need:

Imagine I have created a ticket for a bug. A developer starts solving the bug
and makes some changes, he commits them using "re #23" as comment (using
trac-pre-commit-hook). Now I have a link from the Revision Log to the Ticket -
fine. But how would I (knowing only the ticket number) find the change made
for that ticket?

Now the developer notices that the bug still occurs in specific situations,
therfore he commits some more changes using "re #23" again. Same question
here: how would I get *all* changes for the ticket??
Actually I would expect a list of changesets in the ticket view.

Am I missing something? Is this feature planned? Is this feasible using svn?

Lars.
Howto view (multiple) changesets re a ticket [ In reply to ]
Replying to myself...

I did a bit of investigation on the trac db schema. To me it ssems there is
currently no way to find the revisions associated to a ticket (or: there is no
such association).
I think an additional table ticket_changes with columns ticket-id and
revision-number which could be populated in sync.py would provide the needed
information. For every commited revision get the commit message, find the
ticket # from it (maybe only for occurences of 'fixes #123') and store a new
row with rev#, ticket# in ticket_changes.
Later on, it would be possible to

select r.* from ticket_changes tc, ticket t, revision r
where t.ticket='SelectedTicket'
and tc.ticketid = t.id
and tc.rev = r.rev

and list the revisions which were committed with a message referencing that
ticket.
Unfortunately my experiences with Python are extremely limited, so there's no
much hope that I could implement that myself :-(

Any thoughts??

Lars.



Lars Klose wrote:

> Hi,
>
> just started evaluating Trac. Seems pretty good so far, but there is one
> thing missing (?) I really need:
>
> Imagine I have created a ticket for a bug. A developer starts solving
> the bug and makes some changes, he commits them using "re #23" as
> comment (using trac-pre-commit-hook). Now I have a link from the
> Revision Log to the Ticket - fine. But how would I (knowing only the
> ticket number) find the change made for that ticket?
>
> Now the developer notices that the bug still occurs in specific
> situations, therfore he commits some more changes using "re #23" again.
> Same question here: how would I get *all* changes for the ticket??
> Actually I would expect a list of changesets in the ticket view.
>
> Am I missing something? Is this feature planned? Is this feasible using
> svn?
>
> Lars.
>
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
>

--
_____________________________________________________
Lars Klose Tel. +49 711 / 9672-138
Klein + Stekl GmbH Fax +49 711 / 9672-130
Heusteigstrasse 41 mailto:lars.klose@klst.com
70180 Stuttgart http://www.klst.com
Amtsgericht Kirchheim/Teck HRB 180
Howto view (multiple) changesets re a ticket [ In reply to ]
hi

currently you can do : select * from revision where message like '%#7%';
where 7 is your ticket number

but a ticket_changes can be a good idea

Lars Klose wrote:

> Replying to myself...
>
> I did a bit of investigation on the trac db schema. To me it ssems
> there is currently no way to find the revisions associated to a ticket
> (or: there is no such association).
> I think an additional table ticket_changes with columns ticket-id and
> revision-number which could be populated in sync.py would provide the
> needed information. For every commited revision get the commit
> message, find the ticket # from it (maybe only for occurences of
> 'fixes #123') and store a new row with rev#, ticket# in ticket_changes.
> Later on, it would be possible to
>
> select r.* from ticket_changes tc, ticket t, revision r
> where t.ticket='SelectedTicket'
> and tc.ticketid = t.id
> and tc.rev = r.rev
>
> and list the revisions which were committed with a message referencing
> that ticket.
> Unfortunately my experiences with Python are extremely limited, so
> there's no much hope that I could implement that myself :-(
>
> Any thoughts??
>
> Lars.
>
>
>
> Lars Klose wrote:
>
>> Hi,
>>
>> just started evaluating Trac. Seems pretty good so far, but there is
>> one thing missing (?) I really need:
>>
>> Imagine I have created a ticket for a bug. A developer starts solving
>> the bug and makes some changes, he commits them using "re #23" as
>> comment (using trac-pre-commit-hook). Now I have a link from the
>> Revision Log to the Ticket - fine. But how would I (knowing only the
>> ticket number) find the change made for that ticket?
>>
>> Now the developer notices that the bug still occurs in specific
>> situations, therfore he commits some more changes using "re #23"
>> again. Same question here: how would I get *all* changes for the
>> ticket??
>> Actually I would expect a list of changesets in the ticket view.
>>
>> Am I missing something? Is this feature planned? Is this feasible
>> using svn?
>>
>> Lars.
>>
>> _______________________________________________
>> Trac mailing list
>> Trac@lists.edgewall.com
>> http://lists.edgewall.com/mailman/listinfo/trac
>>
>>
>
Howto view (multiple) changesets re a ticket [ In reply to ]
> currently you can do : select * from revision where message like '%#7%';
> where 7 is your ticket number

Hm. Could well serve as a intermediate solution.

I saw that I could somehow define custom reports, but how would I do that?
Where do I have to put the report definition to make it appear in the report
index?
And where would I have to include the link to the report to show up in the
ticket view?

Lars.



> but a ticket_changes can be a good idea
>
> Lars Klose wrote:
>
>> Replying to myself...
>>
>> I did a bit of investigation on the trac db schema. To me it ssems
>> there is currently no way to find the revisions associated to a ticket
>> (or: there is no such association).
>> I think an additional table ticket_changes with columns ticket-id and
>> revision-number which could be populated in sync.py would provide the
>> needed information. For every commited revision get the commit
>> message, find the ticket # from it (maybe only for occurences of
>> 'fixes #123') and store a new row with rev#, ticket# in ticket_changes.
>> Later on, it would be possible to
>>
>> select r.* from ticket_changes tc, ticket t, revision r
>> where t.ticket='SelectedTicket'
>> and tc.ticketid = t.id
>> and tc.rev = r.rev
>>
>> and list the revisions which were committed with a message referencing
>> that ticket.
>> Unfortunately my experiences with Python are extremely limited, so
>> there's no much hope that I could implement that myself :-(
>>
>> Any thoughts??
>>
>> Lars.
>>
>>
>>
>> Lars Klose wrote:
>>
>>> Hi,
>>>
>>> just started evaluating Trac. Seems pretty good so far, but there is
>>> one thing missing (?) I really need:
>>>
>>> Imagine I have created a ticket for a bug. A developer starts solving
>>> the bug and makes some changes, he commits them using "re #23" as
>>> comment (using trac-pre-commit-hook). Now I have a link from the
>>> Revision Log to the Ticket - fine. But how would I (knowing only the
>>> ticket number) find the change made for that ticket?
>>>
>>> Now the developer notices that the bug still occurs in specific
>>> situations, therfore he commits some more changes using "re #23"
>>> again. Same question here: how would I get *all* changes for the
>>> ticket??
>>> Actually I would expect a list of changesets in the ticket view.
>>>
>>> Am I missing something? Is this feature planned? Is this feasible
>>> using svn?
>>>
>>> Lars.
>>>
>>> _______________________________________________
>>> Trac mailing list
>>> Trac@lists.edgewall.com
>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>
>>>
>>
>
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
>

--
_____________________________________________________
Lars Klose Tel. +49 711 / 9672-138
Klein + Stekl GmbH Fax +49 711 / 9672-130
Heusteigstrasse 41 mailto:lars.klose@klst.com
70180 Stuttgart http://www.klst.com
Amtsgericht Kirchheim/Teck HRB 180
Howto view (multiple) changesets re a ticket [ In reply to ]
add permission REPORT_* to yourself with trac-admin

this will add report modify/report create, etc.. when you are in the
trac module

for linking a report you can use {reportnumber}




Lars Klose wrote:

>> currently you can do : select * from revision where message like '%#7%';
>> where 7 is your ticket number
>
>
> Hm. Could well serve as a intermediate solution.
>
> I saw that I could somehow define custom reports, but how would I do
> that? Where do I have to put the report definition to make it appear
> in the report index?
> And where would I have to include the link to the report to show up in
> the ticket view?
>
> Lars.
>
>
>
>> but a ticket_changes can be a good idea
>>
>> Lars Klose wrote:
>>
>>> Replying to myself...
>>>
>>> I did a bit of investigation on the trac db schema. To me it ssems
>>> there is currently no way to find the revisions associated to a
>>> ticket (or: there is no such association).
>>> I think an additional table ticket_changes with columns ticket-id
>>> and revision-number which could be populated in sync.py would
>>> provide the needed information. For every commited revision get the
>>> commit message, find the ticket # from it (maybe only for occurences
>>> of 'fixes #123') and store a new row with rev#, ticket# in
>>> ticket_changes.
>>> Later on, it would be possible to
>>>
>>> select r.* from ticket_changes tc, ticket t, revision r
>>> where t.ticket='SelectedTicket'
>>> and tc.ticketid = t.id
>>> and tc.rev = r.rev
>>>
>>> and list the revisions which were committed with a message
>>> referencing that ticket.
>>> Unfortunately my experiences with Python are extremely limited, so
>>> there's no much hope that I could implement that myself :-(
>>>
>>> Any thoughts??
>>>
>>> Lars.
>>>
>>>
>>>
>>> Lars Klose wrote:
>>>
>>>> Hi,
>>>>
>>>> just started evaluating Trac. Seems pretty good so far, but there
>>>> is one thing missing (?) I really need:
>>>>
>>>> Imagine I have created a ticket for a bug. A developer starts
>>>> solving the bug and makes some changes, he commits them using "re
>>>> #23" as comment (using trac-pre-commit-hook). Now I have a link
>>>> from the Revision Log to the Ticket - fine. But how would I
>>>> (knowing only the ticket number) find the change made for that ticket?
>>>>
>>>> Now the developer notices that the bug still occurs in specific
>>>> situations, therfore he commits some more changes using "re #23"
>>>> again. Same question here: how would I get *all* changes for the
>>>> ticket??
>>>> Actually I would expect a list of changesets in the ticket view.
>>>>
>>>> Am I missing something? Is this feature planned? Is this feasible
>>>> using svn?
>>>>
>>>> Lars.
>>>>
>>>> _______________________________________________
>>>> Trac mailing list
>>>> Trac@lists.edgewall.com
>>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Trac mailing list
>> Trac@lists.edgewall.com
>> http://lists.edgewall.com/mailman/listinfo/trac
>>
>>
>
Howto view (multiple) changesets re a ticket [ In reply to ]
great! thanks...

Fran?ois Harvey wrote:

> add permission REPORT_* to yourself with trac-admin
>
> this will add report modify/report create, etc.. when you are in the
> trac module
>
> for linking a report you can use {reportnumber}
>
>
>
>
> Lars Klose wrote:
>
>>> currently you can do : select * from revision where message like '%#7%';
>>> where 7 is your ticket number
>>
>>
>>
>> Hm. Could well serve as a intermediate solution.
>>
>> I saw that I could somehow define custom reports, but how would I do
>> that? Where do I have to put the report definition to make it appear
>> in the report index?
>> And where would I have to include the link to the report to show up in
>> the ticket view?
>>
>> Lars.
>>
>>
>>
>>> but a ticket_changes can be a good idea
>>>
>>> Lars Klose wrote:
>>>
>>>> Replying to myself...
>>>>
>>>> I did a bit of investigation on the trac db schema. To me it ssems
>>>> there is currently no way to find the revisions associated to a
>>>> ticket (or: there is no such association).
>>>> I think an additional table ticket_changes with columns ticket-id
>>>> and revision-number which could be populated in sync.py would
>>>> provide the needed information. For every commited revision get the
>>>> commit message, find the ticket # from it (maybe only for occurences
>>>> of 'fixes #123') and store a new row with rev#, ticket# in
>>>> ticket_changes.
>>>> Later on, it would be possible to
>>>>
>>>> select r.* from ticket_changes tc, ticket t, revision r
>>>> where t.ticket='SelectedTicket'
>>>> and tc.ticketid = t.id
>>>> and tc.rev = r.rev
>>>>
>>>> and list the revisions which were committed with a message
>>>> referencing that ticket.
>>>> Unfortunately my experiences with Python are extremely limited, so
>>>> there's no much hope that I could implement that myself :-(
>>>>
>>>> Any thoughts??
>>>>
>>>> Lars.
>>>>
>>>>
>>>>
>>>> Lars Klose wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> just started evaluating Trac. Seems pretty good so far, but there
>>>>> is one thing missing (?) I really need:
>>>>>
>>>>> Imagine I have created a ticket for a bug. A developer starts
>>>>> solving the bug and makes some changes, he commits them using "re
>>>>> #23" as comment (using trac-pre-commit-hook). Now I have a link
>>>>> from the Revision Log to the Ticket - fine. But how would I
>>>>> (knowing only the ticket number) find the change made for that ticket?
>>>>>
>>>>> Now the developer notices that the bug still occurs in specific
>>>>> situations, therfore he commits some more changes using "re #23"
>>>>> again. Same question here: how would I get *all* changes for the
>>>>> ticket??
>>>>> Actually I would expect a list of changesets in the ticket view.
>>>>>
>>>>> Am I missing something? Is this feature planned? Is this feasible
>>>>> using svn?
>>>>>
>>>>> Lars.
>>>>>
>>>>> _______________________________________________
>>>>> Trac mailing list
>>>>> Trac@lists.edgewall.com
>>>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Trac mailing list
>>> Trac@lists.edgewall.com
>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>
>>>
>>
>
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
>

--
_____________________________________________________
Lars Klose Tel. +49 711 / 9672-138
Klein + Stekl GmbH Fax +49 711 / 9672-130
Heusteigstrasse 41 mailto:lars.klose@klst.com
70180 Stuttgart http://www.klst.com
Amtsgericht Kirchheim/Teck HRB 180
Howto view (multiple) changesets re a ticket [ In reply to ]
Ok, I succeeded adding the custom report to the ticket view by adding
<a href="<?cs var:cgi_location?>/report/9?TICKET=<?cs var:ticket.id
?>">Changesets</a>
to ticket.cs
Clicking on it, I get the correct results as a table of revision numbers.

Unfortunately I have not managed to have them formatted as hyperlinks to the
corresponding changeset page. I tried several ways:
- changeset:1
- Changeset [1]
- [1]
- <a href="<?cs var:cgi_location?>/changeset/1">1</a>
- <a href="../changeset/1">1</a>
but all to no avail.
Is this possible at all? Or is linking from a report restricted to tickets?

Another "problem" is that my custom report is listed under the ticket report
index although it won't work there because no ticket number is supplied as
argument. Is there any way to hide a custom report from the ticket report index?

Lars.


Fran?ois Harvey wrote:

> add permission REPORT_* to yourself with trac-admin
>
> this will add report modify/report create, etc.. when you are in the
> trac module
>
> for linking a report you can use {reportnumber}
>
>
>
>
> Lars Klose wrote:
>
>>> currently you can do : select * from revision where message like '%#7%';
>>> where 7 is your ticket number
>>
>>
>>
>> Hm. Could well serve as a intermediate solution.
>>
>> I saw that I could somehow define custom reports, but how would I do
>> that? Where do I have to put the report definition to make it appear
>> in the report index?
>> And where would I have to include the link to the report to show up in
>> the ticket view?
>>
>> Lars.
>>
>>
>>
>>> but a ticket_changes can be a good idea
>>>
>>> Lars Klose wrote:
>>>
>>>> Replying to myself...
>>>>
>>>> I did a bit of investigation on the trac db schema. To me it ssems
>>>> there is currently no way to find the revisions associated to a
>>>> ticket (or: there is no such association).
>>>> I think an additional table ticket_changes with columns ticket-id
>>>> and revision-number which could be populated in sync.py would
>>>> provide the needed information. For every commited revision get the
>>>> commit message, find the ticket # from it (maybe only for occurences
>>>> of 'fixes #123') and store a new row with rev#, ticket# in
>>>> ticket_changes.
>>>> Later on, it would be possible to
>>>>
>>>> select r.* from ticket_changes tc, ticket t, revision r
>>>> where t.ticket='SelectedTicket'
>>>> and tc.ticketid = t.id
>>>> and tc.rev = r.rev
>>>>
>>>> and list the revisions which were committed with a message
>>>> referencing that ticket.
>>>> Unfortunately my experiences with Python are extremely limited, so
>>>> there's no much hope that I could implement that myself :-(
>>>>
>>>> Any thoughts??
>>>>
>>>> Lars.
>>>>
>>>>
>>>>
>>>> Lars Klose wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> just started evaluating Trac. Seems pretty good so far, but there
>>>>> is one thing missing (?) I really need:
>>>>>
>>>>> Imagine I have created a ticket for a bug. A developer starts
>>>>> solving the bug and makes some changes, he commits them using "re
>>>>> #23" as comment (using trac-pre-commit-hook). Now I have a link
>>>>> from the Revision Log to the Ticket - fine. But how would I
>>>>> (knowing only the ticket number) find the change made for that ticket?
>>>>>
>>>>> Now the developer notices that the bug still occurs in specific
>>>>> situations, therfore he commits some more changes using "re #23"
>>>>> again. Same question here: how would I get *all* changes for the
>>>>> ticket??
>>>>> Actually I would expect a list of changesets in the ticket view.
>>>>>
>>>>> Am I missing something? Is this feature planned? Is this feasible
>>>>> using svn?
>>>>>
>>>>> Lars.
>>>>>
>>>>> _______________________________________________
>>>>> Trac mailing list
>>>>> Trac@lists.edgewall.com
>>>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Trac mailing list
>>> Trac@lists.edgewall.com
>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>
>>>
>>
>
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
>

--
_____________________________________________________
Lars Klose Tel. +49 711 / 9672-138
Klein + Stekl GmbH Fax +49 711 / 9672-130
Heusteigstrasse 41 mailto:lars.klose@klst.com
70180 Stuttgart http://www.klst.com
Amtsgericht Kirchheim/Teck HRB 180
Howto view (multiple) changesets re a ticket [ In reply to ]
Actually, I believe you only have to grant REPORT_ADMIN, which is
actually a compound privilege that includes all the other REPORT_
privileges. Or, you can just use TRAC_ADMIN as this should include
every Trac privilege.

-Matthew Good

On Wed, 2004-09-01 at 09:15 -0400, Fran?ois Harvey wrote:
> add permission REPORT_* to yourself with trac-admin
>
> this will add report modify/report create, etc.. when you are in the
> trac module
>
> for linking a report you can use {reportnumber}
>
>
>
>
> Lars Klose wrote:
>
> >> currently you can do : select * from revision where message like '%#7%';
> >> where 7 is your ticket number
> >
> >
> > Hm. Could well serve as a intermediate solution.
> >
> > I saw that I could somehow define custom reports, but how would I do
> > that? Where do I have to put the report definition to make it appear
> > in the report index?
> > And where would I have to include the link to the report to show up in
> > the ticket view?
> >
> > Lars.
> >
> >
> >
> >> but a ticket_changes can be a good idea
> >>
> >> Lars Klose wrote:
> >>
> >>> Replying to myself...
> >>>
> >>> I did a bit of investigation on the trac db schema. To me it ssems
> >>> there is currently no way to find the revisions associated to a
> >>> ticket (or: there is no such association).
> >>> I think an additional table ticket_changes with columns ticket-id
> >>> and revision-number which could be populated in sync.py would
> >>> provide the needed information. For every commited revision get the
> >>> commit message, find the ticket # from it (maybe only for occurences
> >>> of 'fixes #123') and store a new row with rev#, ticket# in
> >>> ticket_changes.
> >>> Later on, it would be possible to
> >>>
> >>> select r.* from ticket_changes tc, ticket t, revision r
> >>> where t.ticket='SelectedTicket'
> >>> and tc.ticketid = t.id
> >>> and tc.rev = r.rev
> >>>
> >>> and list the revisions which were committed with a message
> >>> referencing that ticket.
> >>> Unfortunately my experiences with Python are extremely limited, so
> >>> there's no much hope that I could implement that myself :-(
> >>>
> >>> Any thoughts??
> >>>
> >>> Lars.
> >>>
> >>>
> >>>
> >>> Lars Klose wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> just started evaluating Trac. Seems pretty good so far, but there
> >>>> is one thing missing (?) I really need:
> >>>>
> >>>> Imagine I have created a ticket for a bug. A developer starts
> >>>> solving the bug and makes some changes, he commits them using "re
> >>>> #23" as comment (using trac-pre-commit-hook). Now I have a link
> >>>> from the Revision Log to the Ticket - fine. But how would I
> >>>> (knowing only the ticket number) find the change made for that ticket?
> >>>>
> >>>> Now the developer notices that the bug still occurs in specific
> >>>> situations, therfore he commits some more changes using "re #23"
> >>>> again. Same question here: how would I get *all* changes for the
> >>>> ticket??
> >>>> Actually I would expect a list of changesets in the ticket view.
> >>>>
> >>>> Am I missing something? Is this feature planned? Is this feasible
> >>>> using svn?
> >>>>
> >>>> Lars.
> >>>>
> >>>> _______________________________________________
> >>>> Trac mailing list
> >>>> Trac@lists.edgewall.com
> >>>> http://lists.edgewall.com/mailman/listinfo/trac
> >>>>
> >>>>
> >>>
> >>
> >> _______________________________________________
> >> Trac mailing list
> >> Trac@lists.edgewall.com
> >> http://lists.edgewall.com/mailman/listinfo/trac
> >>
> >>
> >
>
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
Howto view (multiple) changesets re a ticket [ In reply to ]
On Tue, Aug 31, 2004 at 05:37:49PM +0200, Lars Klose wrote:
> Imagine I have created a ticket for a bug. A developer starts solving the
> bug and makes some changes, he commits them using "re #23" as comment
> (using trac-pre-commit-hook). Now I have a link from the Revision Log to
> the Ticket - fine. But how would I (knowing only the ticket number) find
> the change made for that ticket?

Why not use trac-post-commit-hook? That way, a new comment will be added
to the ticket, mentioning the revision involved.
--
Tristan Seligmann
Software Engineer / Network Administrator