Wrong spark lines shown if dev focus branch not first

Bug #390397 reported by Tim Penhey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Paul Hummer

Bug Description

https://code.edge.launchpad.net/~thumper shows the launchpad spark line for the lp:mad branch.

This is due to the following code getting the the json_url from the first branch, rather than checking which branch it should be getting it from. Which brings up another bug, only one spark line is shown even if I have subscribed to many branches that are development focus branches.

function renderSpark() {
    spark_div = 'dev_focus_spark';

    if(Y.get('#' + spark_div) !== null) {
        json_url = branch_sparks[0][1];
        var container = spark_div;
        var uri = json_url;
        var xhr_config = {
            on: {
                success: doUpdate,
            },
            arguments: {
                'container': container
            }
        };

      Y.io(uri, xhr_config);
    }
}

Tags: lp-code ui ajax
Revision history for this message
Tim Penhey (thumper) wrote :

Martin, I'm assigning it to you as we need to decide how many to show, and also how to fire off a whole pile of non-blocking update requests (if sending off multiple).

Revision history for this message
Jonathan Lange (jml) wrote :

We should show sparklines for all branches on a person's page. On product listings, we show only the dev focus because there's not much variation between branches. However, on person listings, we can expect a great deal of variation (and often no development focus).

Revision history for this message
Martin Albisetti (beuno) wrote :

:)

Changed in launchpad-code:
assignee: Martin Albisetti (beuno) → Tim Penhey (thumper)
Revision history for this message
Tim Penhey (thumper) wrote :

lp:~thumper/launchpad/sparkline-listings makes it so the javascript array branch_sparks contains the urls to hit.

See https://code.launchpad.dev/~name12

The branch_spacks array has two values, the first is the id of the div to replace, and the second is the url to get the values.

You probably want to consider changing the styles on the dev_focus_spark div, or perhaps killing it all together.

Changed in launchpad-code:
assignee: Tim Penhey (thumper) → Martin Albisetti (beuno)
Tim Penhey (thumper)
Changed in launchpad-code:
milestone: 2.2.6 → 2.2.7
Tim Penhey (thumper)
Changed in launchpad-code:
assignee: Martin Albisetti (beuno) → Paul Hummer (rockstar)
Paul Hummer (rockstar)
Changed in launchpad-code:
status: Triaged → In Progress
Revision history for this message
Paul Hummer (rockstar) wrote :

Didn't make PQM, due to a facepalming oversight by myself. :/

Changed in launchpad-code:
milestone: 2.2.7 → 2.2.9
Revision history for this message
Matthew Revell (matthew.revell) wrote :

Retargeting to 3.0, which is the new name for 2.2.9. Haven't renamed the milestone as the 3.0 milestone is in a different series.

Changed in launchpad-code:
milestone: 2.2.9 → 3.0
Paul Hummer (rockstar)
Changed in launchpad-code:
status: In Progress → Fix Committed
Paul Hummer (rockstar)
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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