Closed Bug 1132963 Opened 9 years ago Closed 9 years ago

Automatically detect and redirect to Google doc URLs (akin to github-pr and rb handling)

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ckprice, Assigned: glob)

Details

User Story

It would be great to be able to use the awesome review/tracking/obsoleting functionality in Bugzilla on Google Documents.

Attachments

(2 files)

Attached file Sad trombone
This is to request we enable the ability to "Paste as attachment" a Google Doc link and have Bugzilla convert it into an HTTP link. Bonus points if we're able to just paste in the link and use auto-detect.
Assignee: nobody → glob
Component: Administration → Extensions: BMO
Summary: Add Google Documents to the content type (auto-detect would be great) → Automatically detect and redirect to Google doc URLs (akin to github-pr and rb handling)
Attached patch 1132963_1.patchSplinter Review
- refactor "attachment urls that redirect"
- add google docs

note: this won't apply retroactively to any existing attachments.
Attachment #8565078 - Flags: review?(dylan)
Comment on attachment 8565078 [details] [diff] [review]
1132963_1.patch

Review of attachment 8565078 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan

(I knew I had done this before: "Restored from draft; last edited 2/16/2015")

::: extensions/BMO/Extension.pm
@@ +778,2 @@
>      return unless
> +        grep { $attachment->contenttype eq $autodetect_attach_urls{$_}->{content_type} }

nit: I'd prefer any { } here.

::: extensions/BMO/lib/Data.pm
@@ +19,4 @@
>                    %product_sec_groups
>                    %create_bug_formats
>                    @default_named_queries
> +                  %autodetect_attach_urls );

this++
I much prefer exporting a hash to another silly constant :)
Attachment #8565078 - Flags: review?(dylan) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   81f9221..2d8badf  master -> master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to Dylan William Hardison [:dylan] from comment #2)
> > +        grep { $attachment->contenttype eq $autodetect_attach_urls{$_}->{content_type} }
> 
> nit: I'd prefer any { } here.

'any' isn't available in the version of List::Util we have installed :(

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   17f05cd..6da6c66  master -> master
Attachment #8564222 - Attachment mime type: text/plain → text/x-google-doc
Component: Extensions: BMO → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: