Edgewall Software

Opened 6 years ago

Closed 6 years ago

#11838 closed defect (fixed)

Milestone links should not be followable on query page when user doesn't have MILESTONE_VIEW

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.3
Component: ticket system Version:
Severity: normal Keywords: query milestone
Cc: Branch:
Release Notes:

The standard milestone resource link is displayed in the query results, which is non-followable if the user doesn't have MILESTONE_VIEW.

API Changes:

Added render_resource_link to the Chrome data dictionary as resource_link, partially evaluated with the Environment argument.

Internal Changes:


The links should be rendered with the missing class.

Attachments (0)

Change History (2)

comment:1 by Ryan J Ollos, 6 years ago

  • trac/ticket/templates/query_results.html

    diff --git a/trac/ticket/templates/query_results.html b/trac/ticket/templates/query_results.html
    index 747da1f..aca3906 100644
    a b Arguments:  
    9090                      <py:when test="name == 'reporter'">${authorinfo(value)}</py:when>
    9191                      <py:when test="name == 'cc'">${format_emails(ticket_context, value)}</py:when>
    9292                      <py:when test="name == 'owner' and value">${authorinfo(value)}</py:when>
    93                       <py:when test="name == 'milestone'"><a py:if="value" title="View milestone" href="${href.milestone(value)}">${value}</a></py:when>
     93                      <py:when test="name == 'milestone'"><py:if test="value">${resource_link(context, Resource('milestone', value), 'compact')}</py:if></py:when>
    9494                      <py:when test="header.wikify">${wiki_to_oneliner(ticket_context, value)}</py:when>
    9595                      <py:when test="header.wikifyblock">${wiki_to_html(ticket_context, value)}</py:when>
    9696                      <py:otherwise>$value</py:otherwise>
  • trac/web/chrome.py

    diff --git a/trac/web/chrome.py b/trac/web/chrome.py
    index 5f769a1..bb0d3c8 100644
    a b class Chrome(Component):  
    952952            'name_of': partial(get_resource_name, self.env),
    953953            'shortname_of': partial(get_resource_shortname, self.env),
    954954            'summary_of': partial(get_resource_summary, self.env),
     955            'resource_link': partial(render_resource_link, self.env),
    955956            'req': req,
    956957            'abs_href': abs_href,
    957958            'href': href,

The tooltip for the link changes from View milestone to one that is dependent on whether the milestone is completed, overdue and the due date is set (#10962). That appears to be an enhancement to me, unless there are any accessibility issues (screen readers and the like).

comment:2 by Ryan J Ollos, 6 years ago

API Changes: modified (diff)
Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Committed to 1.0-stable in [13369], merged to trunk in [13370].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment

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