Merge lp://staging/~adeuring/launchpad/bug-596944-browser into lp://staging/launchpad/db-devel

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 10033
Proposed branch: lp://staging/~adeuring/launchpad/bug-596944-browser
Merge into: lp://staging/launchpad/db-devel
Diff against target: 373 lines (+155/-93)
7 files modified
lib/lp/bugs/browser/bugtarget.py (+9/-6)
lib/lp/bugs/browser/tests/test_bugtarget_configure.py (+6/-2)
lib/lp/bugs/browser/tests/test_bugtarget_filebug.py (+37/-0)
lib/lp/bugs/interfaces/bugtarget.py (+7/-0)
lib/lp/bugs/templates/bugtarget-filebug-search.pt (+92/-83)
lib/lp/registry/browser/distributionsourcepackage.py (+2/-1)
lib/lp/registry/browser/tests/distributionsourcepackage-views.txt (+2/-1)
To merge this branch: bzr merge lp://staging/~adeuring/launchpad/bug-596944-browser
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Abel Deuring (community) Needs Resubmitting
j.c.sackett (community) code* Approve
Review via email: mp+42505@code.staging.launchpad.net

Commit message

[r=jcsackett,sinzui][ui=none][bug=596944] The forms to configure the bugtracker for products and for DSPs now contains a field enable_bugfiling_duplicate_search; bug filing pages show immediately the complete form if enable_bugfiling_duplicate_search is turned off.

Description of the change

This branch adds a field to enable/disable duplicate searches to the bug tracker configuration forms for distribution source packages and for products.

The template for filing bugs now renders the "main bug report form" immediately if the duplicate search is disabled.

I talked with Deryck about writing unit tests for the changes, but we think it is better toland the branch before PQM closes tomorrow, so I simply extended an existing page test instead.

test: ./bin/test -vvt xx-product-guided-filebug.txt

no lint, excpet complaints about Moin headers in the page test

To post a comment you must log in.
Revision history for this message
j.c.sackett (jcsackett) wrote :

Abel--

This looks like a nice branch.

I would really appreciate it if you could clean up the moin headers to restructured text, since that's the direction we seem to be heading in docs/stories.

Also: this may be just prejudice on my part, but it might be worth getting an RC for this branch and building out the unittests for this. Not a blocker for the branch, but an idea.

Aside from that, thanks for cleaning up some formatting and link text while you were at it.

review: Approve (code*)
Revision history for this message
Curtis Hovey (sinzui) wrote :

The additions to the story test are not a story. If I remove the code, the text does not make sense. If I just read the code in the story, I do not know why an admin is making the change for a project he does not own (either the owner does not have permission or we are masking permission issues--do not use admin when unless only an admin can do the task). Users do not read URLs, they read browser title and page content. I personally cannot see how the change is being tests. I do not think a slow story is needed for these changes.

The change was to a view and I expect TestProductBugConfigurationView to be updated to verify the field is present and mutable by the project owner or bug supervisor. I think you could test for html ids to verify the correct template chunks were rendered
    self.assertIsNot(None, find_tag_by_id(view.render(), 'an-id'))

review: Needs Fixing (code)
Revision history for this message
Abel Deuring (adeuring) wrote :

I've added unit tests for both variants of the bug reporting form and changed an existing test for the edit form.

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

Your test additions are lovely.

Remove the previous additions to lib/lp/bugs/stories/guided-filebug/xx-product-guided-filebug.txt. We want to test something once and test it very well. The story additions do not document what the user is trying to accomplish, they are slow to execute, and could contradict the definitive tests when subsequent changes are made.

review: Approve (code)

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.

Subscribers

People subscribed via source and target branches

to status/vote changes: