Modify

Opened 12 months ago

Closed 12 months ago

Last modified 11 months ago

#11479 closed enhancement (fixed)

Improve plugin association in defect reporting

Reported by: rjollos Owned by: rjollos
Priority: normal Component: TracHacks
Severity: normal Keywords:
Cc: hasienda, otaku42, jun66j5 Trac Release:

Description

On tickets that are populated by clicking create on an error page, the Component is not set and so we rely on the user to set the Component field. Frequently they do not. I briefly investigated ways to solve this. We could add Component to the GET request:

  • trac/templates/error.html

    diff --git a/trac/templates/error.html b/trac/templates/error.html
    index 6e6a6e6..6c4fc34 100644
    a b  
    5858    <input py:if="url == trac.homepage.strip('/')" type="hidden" name="version"
    5959           value="${trac.version.split('-', 1)[0] if 'dev' in trac.version else trac.version}" />
    6060    <input type="hidden" name="summary" value="$message" />
     61    <input py:if="'trac' not in faulty_plugins[0]['info']" type="hidden" name="component" value="${faulty_plugins[0]['name']}" />
    6162    <textarea name="description" rows="3" cols="10">
    6263${description_en if url else description}</textarea>
    6364    <span class="inlinebuttons">

That would only work in cases that the plugin name matches the project name. Frequently they do not, for example: SumStatsPlugin and TracSumStats. Perhaps we could use IRequestHandler to handle some common mappings, such as TracSumStats -> SumStatsPlugin.

Attachments (0)

Change History (4)

comment:1 Changed 12 months ago by rjollos

  • Status changed from new to accepted

A better idea I think is to use url from setup.py via info.get('home_page') to extract the Component and pass it as a parameter in the GET request: t:browser:/branches/1.0-stable/trac/web/main.py?rev=12315&marks=561,586-587#L553.

comment:2 Changed 12 months ago by rjollos

See proposed change in trac:#11434.

comment:3 Changed 12 months ago by rjollos

  • Resolution set to fixed
  • Status changed from accepted to closed

Assuming upstream change will be accepted, closing this ticket for now.

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.