Edgewall Software
Modify

Opened 19 years ago

Last modified 9 years ago

#1947 new enhancement

Nicer handling of bugtraq properties

Reported by: borzwazie@… Owned by:
Priority: normal Milestone: unscheduled
Component: version control/browser Version: devel
Severity: minor Keywords: svn property
Cc: ttingey@…, me@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It would appear that Trac partially supports Subversion bugtraq properties, useful for linking changesets back to the issue tracking url. However, when you add these properties, the output looks like this:

Added Subversion bugtraq properties to repository. bugtraq:message "#1"

While the #1 is correctly linked back to the issue, it's because Trac is using the built-in regex to link back. If the full bugtraq properties were read correctly, the Subversion repository would provide this information.

try setting the following properties on a Subversion repository (be sure to do this recursively):

bugtraq:label #
bugtraq:url http://localhost/cgi-bin/trac.cgi/ticket/%BUGID%
bugtraq:message "#%BUGID%"
bugtraq:number true
bugtraq:warnifnoissue false

If you connect to a subversion repository with a tool like TortoiseSVN, you'll be able to click on the defect number and link directly back to the issue in Trac.

Full support of this in Trac would be a nice enhancement.

Attachments (0)

Change History (15)

comment:1 by Christopher Lenz, 19 years ago

Component: ticket systembrowser
Milestone: 0.9

comment:2 by Christian Boos, 19 years ago

Milestone: 1.0
Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor
Status: newassigned

See also #1601, which proposes a framework for handling this kind of enhancements.

I'm also beginning to think that simply associating MIME-Types to properties would probably already be a good step forward. In that perspective, declaring the bugtraq:message property to be of type text/x-trac-wiki would be enough.

(and for #1896, we could associate svk:merge to application/octet-stream to simply hide it, and to application/x-svk-merge for a dedicated processing in the appropriate Mimeview renderer)

comment:3 by Matthew Good, 19 years ago

cboos: the point of this ticket is that rendering the bugtraq:message property with the Trac Wiki syntax is not sufficient since it doesn't honor the other bugtraq properties which may refer to an external bug tracking system. So, rendering it for the mime type text/x-trac-wiki is not going to solve this issue.

I don't really see any benefit to mapping other SVN properties into mime types since it seems like we'd need to come up with some bogus mime type for most of the different properties. It would simply be cleaner to just use the property names as the keys for mapping them to an appropriate renderer. The property viewer API could be patterned after the mime viewer API, but I don't think it really lends itself to reuse.

It will also be necessary to deviate a bit from the mime viewer API since as seen with bugtraq it may not be possible to render each property on it's own, since rendering bugtraq:message also requires knowing the other 5 properties mentioned above.

comment:4 by Christian Boos, 19 years ago

In the example from the ticket description, the other bugtraq properties were actually set to point to Trac's ticket system, which I guess could be made the default if the bugtraq:url is not set. But I see your point.

In the render method, we should actually get a dictionary of property name and values.

comment:5 by Christian Boos, 18 years ago

For further reference, the issue tracker interoperability spec can be found there: http://guest:guest@tortoisesvn.tigris.org/svn/tortoisesvn/tags/version_1.2.0/doc/issuetrackers.txt

comment:6 by borzwazie@…, 18 years ago

I was assuming that if one was running Trac that you'd want to point it to the built-in issue tracking, but the point is well-made that it might actually point to some other tracker. I don't think it really matters, provided the repository admin isn't weird enough to try something like that.

there's no facility within Trac to create or admin repositories (maybe another feature request?) so the only way that's going to get in there is if the svn admin sets it.

subversion will let you create any property you want (aside from a few reserved names I think), so maybe if you want to turn "off" the original trac tracking functionality and use the subversion bugtraq instead, have the user create a custom property on the repository that you'd look for and then read the bugtraq properties instead of using the built-in regex. the property need not even be recursive, you could simply set it at the top of the project tree.

comment:7 by Christian Boos, 18 years ago

Status: assignednew

(changing the status, as I've not actually started to work on that yet)

comment:8 by dserodio@…, 18 years ago

Cc: dserodio@… added

comment:9 by anonymous, 18 years ago

Cc: ttingey@… added

comment:10 by Christian Boos, 17 years ago

See also how to configure TortoiseSVN so that you can link back to Trac (0.11dev ≥ r4239) from Tortoise's revision log.

in reply to:  10 comment:11 by anonymous, 17 years ago

Cc: me@… added

Replying to cboos:

See also how to configure TortoiseSVN so that you can link back to Trac (0.11dev ≥ r4239) from Tortoise's revision log.

Replying to how to configure TortoiseSVN:

Implemented in r4239.

Now the TortoiseSVN's bugtraq:url property could be configured to point to one of these:

  • <your-trac-url>/intertrac/ticket:%BUGID%
  • <your-trac-url>/query?id=%BUGID%


In addition, the bugtraq:logregex property could be set to:

(?:ticket:|#)\d+(?:[-:]\d+)?(?:,\d+(?:[-:]\d+)?)*
\d+(?:[-:]\d+)?(?:,\d+(?:[-:]\d+)?)*

in order to match the regexps now used by Trac.

What I would actually love to see, is to have Trac itself actually use the bugtraq:logregex setting, or probably better, to allow the changing of the regex used to identify ticket id's in trac.ini.

Take this regex for example (is what I use):

[Ii]ssues? (#(\d+)(,? ?#(\d+))*( [aA][nN][dD] #(\d+))?)
(\d+)

comment:12 by Christian Boos, 14 years ago

Milestone: 1.0unscheduled

Milestone 1.0 deleted

comment:13 by Peter Suter, 12 years ago

Keywords: svn property added

comment:14 by dserodio@…, 12 years ago

Cc: dserodio@… removed

comment:15 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.