Closed
Bug 821410
Opened 12 years ago
Closed 11 years ago
Add support for bitbucket for the 'See Also' field
Categories
(Bugzilla :: Creating/Changing Bugs, enhancement)
Bugzilla
Creating/Changing Bugs
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: mgorny, Assigned: koosha.khajeh)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
2.27 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Please add support for adding bitbucket project issues in the 'See Also' field. The bitbucket issue trackers use URLs like: https://bitbucket.org/<user>/<project>/issue/<n> where <user> & <project> would be \S+?, and <n> would be \d+.
Reporter | ||
Updated•12 years ago
|
Blocks: bz-seealso
Assignee: create-and-change → koosha.khajeh
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #691993 -
Flags: review?(LpSolit)
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → Bugzilla 4.4
ah, forgot to ignore the case.
Attachment #691993 -
Attachment is obsolete: true
Attachment #691993 -
Flags: review?(LpSolit)
Attachment #692004 -
Flags: review?(LpSolit)
Comment 3•12 years ago
|
||
Comment on attachment 692004 [details] [diff] [review] patch - v1 Move this into the MoreBugUrl extension.
Attachment #692004 -
Flags: review?(LpSolit) → review-
OK then, moved the code to the extension.
Attachment #692004 -
Attachment is obsolete: true
Attachment #692238 -
Flags: review?(LpSolit)
Comment 5•12 years ago
|
||
Comment on attachment 692238 [details] [diff] [review] patch - v2 >=== added file 'extensions/MoreBugUrl/lib/BitBucket.pm' >+ return ($uri->authority =~ /^bitbucket.org$/i It's a regexp, so you must escape dots as \., see bug 825758. >+ && $uri->path =~ m|\S+/\S+/issue/\d+|i) ? 1 : 0; \S accepts any non-whitespace character, including /, so this regexp doesn't do its job correctly. You must use [^/] instead of \S. >+sub _check_value { It must sanitize URLs. An issue on bitbucket.org can have a URL of the form https://bitbucket.org/ehsan/bugzilla-tweaks/issue/13/add-option-to-hide-possible-duplicates-ui but Bugzilla should only store https://bitbucket.org/ehsan/bugzilla-tweaks/issue/13 which will point to the same issue. See how this is done in Bugzilla/BugUrl/Launchpad.pm.
Attachment #692238 -
Flags: review?(LpSolit) → review-
Attachment #692238 -
Attachment is obsolete: true
Attachment #697475 -
Flags: review?(LpSolit)
Comment 7•11 years ago
|
||
Comment on attachment 697475 [details] [diff] [review] patch v3 >=== added file 'extensions/MoreBugUrl/lib/BitBucket.pm' >+package Bugzilla::Extension::MoreBugUrl::BitBucket; >+use strict; >+use base qw(Bugzilla::BugUrl); Missing |use 5.10.1|. Also, s/use base/use parent/. Otherwise looks good. r=LpSolit
Attachment #697475 -
Flags: review?(LpSolit) → review+
Updated•11 years ago
|
Flags: approval+
Target Milestone: Bugzilla 4.4 → Bugzilla 5.0
Comment 8•11 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified extensions/MoreBugUrl/Extension.pm added extensions/MoreBugUrl/lib/BitBucket.pm modified extensions/MoreBugUrl/template/en/default/hook/global/user-error-bug_url_invalid_tracker.html.tmpl Committed revision 8569.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•