"Releases:" not omitted from listings when empty

Bug #385919 reported by William Grant
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Curtis Hovey

Bug Description

The project listing in the bottom left of the project group page omits the "Milestones:" heading if there are no milestones in a project, but the "Releases:" heading seems to always be there.

See https://edge.launchpad.net/lazr for an example.

Revision history for this message
Curtis Hovey (sinzui) wrote :

The tests imply this is intentional. I think it is annoying...if we want users to know there are no release we should at least say so.

Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
importance: Undecided → Low
milestone: none → 2.2.6
status: New → Triaged
Revision history for this message
Curtis Hovey (sinzui) wrote :

William Grant said:
    Even when there are releases and milestones, they say something like
    "Milestones 1.15.1, 1.15final, 1.15rc1 , Releases 1.15.1, 1.15final, 1.15rc1."
    There should be some better separator between the milestones and releases,
    there's an extra space before a comma, and there are colons missing

Indeed this is true, and has been true for several years. This layout is controlled by a single viewlet, this is easy to fix, but the branch will be large because a lot of tests need updating. It is still trivial, but it will probably require its own branch.

Curtis Hovey (sinzui)
summary: - "Releases:" not omitted from project group's project listing when empty
+ "Releases:" not omitted from listings when empty
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is not easy as I first thought. The templates/macros expect a list, and in many cases the list is created by a view. Both Product and ProductSeries return a ResultSet. So the problem is that incompatible objects are being passed to the portlets and macros.

The simplest way to fix this is to change the model objects to return lists because that is how we want to use them.
      * Change the models to return lists
      * Update the three callsites that use count() to use len()
        Note that they are tests, not code.
      * Update the 10 callsites that check for empty lists to tal:define
        them first.

The alternate approach to make resultsets compatible objects, which in this cases means adding counts. Note that Storm does not use this, so this approach must be dismantled in the future.
    * Change the views that return lists to add a count attribute to them
    * Update the 10 callsites that check for empty lists to tal:define them first and verify the count

Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Triaged → In Progress
Curtis Hovey (sinzui)
tags: added: story-series-milestones-releases
Revision history for this message
Curtis Hovey (sinzui) wrote :

Fixed in launchpad devel r8631.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Revision history for this message
Curtis Hovey (sinzui) wrote : Bug 385919 Fix released

Fixed released in Launchpad 2.2.6.

Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.