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

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
Extensions: BMO
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: ckprice, Assigned: glob)

Tracking

Production
x86
Mac OS X

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 attachments)

Created attachment 8564222 [details]
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)

Updated

3 years ago
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)
(Assignee)

Comment 1

3 years ago
Created attachment 8565078 [details] [diff] [review]
1132963_1.patch

- 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+
(Assignee)

Comment 3

3 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   81f9221..2d8badf  master -> master
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

3 years ago
(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
(Assignee)

Updated

3 years ago
Attachment #8564222 - Attachment mime type: text/plain → text/x-google-doc
You need to log in before you can comment on or make changes to this bug.