Merge lp://staging/~gmb/launchpad/inline-help-for-bugwatches-2-bug-530162 into lp://staging/launchpad

Proposed by Graham Binns
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 10906
Proposed branch: lp://staging/~gmb/launchpad/inline-help-for-bugwatches-2-bug-530162
Merge into: lp://staging/launchpad
Diff against target: 497 lines (+289/-76)
9 files modified
lib/lp/bugs/browser/bugtask.py (+61/-2)
lib/lp/bugs/browser/configure.zcml (+3/-0)
lib/lp/bugs/configure.zcml (+0/-1)
lib/lp/bugs/interfaces/bugwatch.py (+0/-3)
lib/lp/bugs/model/bugwatch.py (+0/-47)
lib/lp/bugs/stories/bugwatches/xx-bugwatch-errors.txt (+23/-16)
lib/lp/bugs/templates/bugtask-edit-form.pt (+9/-3)
lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt (+8/-4)
lib/lp/bugs/templates/bugwatch-error-help.pt (+185/-0)
To merge this branch: bzr merge lp://staging/~gmb/launchpad/inline-help-for-bugwatches-2-bug-530162
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Matthew Revell (community) help Approve
Review via email: mp+25784@code.staging.launchpad.net

Commit message

Popup help has been added for BugWatch errors.

Description of the change

This branch adds inline help for bug watch errors. The idea is that users should be able to fix bug watch error problems themselves (where possible) rather than just being presented with an opaque error.

I've made the following changes:

== lib/lp/bugs/browser/bugtask.py ==

 - I've added a mixin class that can be used by views that display bugwatch error data. This has a single property, bug_watch_error_message, which returns a dict of error-message related gubbins. This property contains the functionality previously found in BugWatch.getLastErrorMessage(), but since that method was used only in view code it seemed to make more sense to implement it in a view mixin rather than as part of the model.

== lib/lp/bugs/browser/configure.zcml ==

 - I've added the necessary ZCML for the BugWatch +error-help view.

== lib/lp/bugs/configure.zcml ==

 - I've removed getLastErrorMessage() from the BugWatch ZCML.

== lib/lp/bugs/interfaces/bugwatch.py ==

 - I've removed the declaration of IBugWatch.getLastErrorMessage()

== lib/lp/bugs/model/bugwatch.py ==

 - I've removed the implementation of BugWatch.getLastErrorMessage()

== lib/lp/bugs/templates/bugtask-edit-form.pt ==

 - I've added popup help to the warning icon that appears when a BugWatch has failed to update.

== lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt ==

 - I've added a popup help link to the error message that appears when a BugWatch has failed to update.

== lib/lp/bugs/templates/bugwatch-error-help.pt ==

 - I've added help for the various different types of error that a BugWatch could encounter.

=== lib/lp/bugs/stories/bugwatches/xx-bugwatch-errors.txt ==

 - I've updated the story to take account of the popup help links.

To post a comment you must log in.
Revision history for this message
Matthew Revell (matthew.revell) wrote :

+1 on the help pop-up text and great work on creating a dynamic help pop-up.

Small typo:

"The remote bug ID that the bug watch is linked it isn't valid on the remote bug tracker."

Should that be "...is linked to..." ?

review: Approve (help)
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)
Revision history for this message
Abel Deuring (adeuring) wrote :
Download full text (6.7 KiB)

/lp/bugs/templates/bugwatch-error-help.pt'
> --- lib/lp/bugs/templates/bugwatch-error-help.pt 1970-01-01 00:00:00 +0000
> +++ lib/lp/bugs/templates/bugwatch-error-help.pt 2010-05-21 14:59:31 +0000
> @@ -0,0 +1,182 @@
> +<html>
> + <head>
> + <title>Bug watch errors</title>
> + <link rel="stylesheet" type="text/css"
> + href="/+icing/yui/cssreset/reset.css" />
> + <link rel="stylesheet" type="text/css"
> + href="/+icing/yui/cssfonts/fonts.css" />
> + <link rel="stylesheet" type="text/css"
> + href="/+icing/yui/cssbase/base.css" />
> + </head>
> + <body tal:define="watch view/context">
> + <h1>Bug watch update errors</h1>
> + <p>
> + Bug watches don't always update successfully. When a bug watch
> + fails to update, Launchpad records what went wrong.
> + </p>
> + <a name="UNKNOWN"></a>
> + <h2>Unknown error</h2>
> + <h3>What went wrong?</h3>
> + <p>
> + Launchpad encountered an unexpected error when trying to retrieve
> + the bug from the remote server.
> + </p>
> + <h3>How can I help fix it?</h3>
> + <p>
> + <a href="mailto:<email address hidden>">Contact us</a> and let us
> + know about the problem.
> + </p>
> + <a name="BUG_NOT_FOUND"></a>
> + <h2>Bug Not Found</h2>
> + <h3>What went wrong?</h3>
> + <p>
> + Launchpad could not find the specified bug on the remote server.
> + </p>
> + <h3>How can I help fix it?</h3>
> + <p>
> + Check that the remote bug
> + (<a tal:replace="structure watch/fmt:external-link" />)
> + exists on the external bug tracker. If it doesn't, you should try
> + to find the correct bug and
> + <a tal:attributes="href watch/fmt:url">update the watch</a> so
> + that it points to the correct remote bug.
> + </p>
> + <a name="CONNECTION_ERROR"></a>
> + <h2>Connection Error</h2>
> + <h3>What went wrong?</h3>
> + <p>
> + Launchpad was unable to connect to the remote server.
> + </p>
> + <h3>How can I help fix it?</h3>
> + <p>
> + Check that the remote bug tracker
> + (<a tal:replace="structure watch/bugtracker/fmt:external-link" />)
> + is on-line. If it is, you should
> + <a href="mailto:<email address hidden>">contact us</a> and let us
> + know about the problem.
> + </p>
> + <a name="INVALID_BUG_ID"></a>
> + <h2>Invalid Bug ID</h2>
> + <h3>What went wrong?</h3>
> + <p>
> + The remote bug ID that the bug watch is linked it isn't valid on
> + the remote bug tracker.
> + </p>
> + <h3>How can I help fix it?</h3>
> + <p>
> + <a href="mailto:<email address hidden>">Contact us</a> and let us

...know about the problem

> + </p>
> + <a name="TIMEOUT"></a>
> + <h2>Timeout</h2>
> + <h3>What went wrong?</h3>
> + <p>
> + Launchpad encountered a timeout when trying to connect to the
> + remote server and was unable to retrieve the bug's status.
> + </p>
> + <h3>How can I help fix it?</h3>
> + <p>
> + <a href="mailto:<email address hidden>">Contact us</a> and let us

...know about the problem

> + </p>
> + <p>
> + Check that the remote b...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.