Page MenuHomePhabricator

Add link custom field.
ClosedPublic

Authored by slester on Apr 24 2015, 5:59 PM.
Tags
None
Referenced Files
F13046050: D12543.id30121.diff
Thu, Apr 18, 5:59 AM
F13046049: D12543.id30120.diff
Thu, Apr 18, 5:59 AM
F13046048: D12543.id30117.diff
Thu, Apr 18, 5:58 AM
Unknown Object (File)
Thu, Apr 18, 5:38 AM
Unknown Object (File)
Thu, Apr 18, 5:09 AM
Unknown Object (File)
Thu, Apr 11, 10:56 AM
Unknown Object (File)
Mon, Apr 8, 11:02 AM
Unknown Object (File)
Thu, Apr 4, 7:20 PM
Subscribers

Details

Summary

Ref T3868. Adds a link custom field that verifies and links to the text provided.

Test Plan

Add a custom field with type "link", then enter a well-formed URL in the provided box in the edit task screen. Verify that the URL displays correctly on the task display page.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

slester retitled this revision from to Add link custom field..
slester updated this object.
slester edited the test plan for this revision. (Show Details)
epriestley added a reviewer: epriestley.

Fix lint, couple of inlines. Generally looks good.

src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php
24–26

I don't think we should imply a protocol. https:// is increasingly the right protocol, and is a safer default, but choosing either HTTP or HTTPS will break some links in a confusing way. Implying either protocol also means that the field won't faithfully reflect the value the user entered.

I think it would be better to just return the text as plain text, but without mutating it, if it's missing a protocol or isn't a valid link for some other reason.

28

If there's a value, but it's not a valid link, let's just return the value (as plain text) instead of returning null? Then users can at least see what was entered, even if they can't click it.

This revision now requires changes to proceed.Apr 24 2015, 6:22 PM
This comment was removed by slester.
slester edited edge metadata.

Remove HTTP opinions, fix lint

epriestley edited edge metadata.

Cool, thanks!

This revision is now accepted and ready to land.Apr 24 2015, 6:48 PM
Closed by commit rP1ab6ad3ee814: Add link custom field. (authored by root <root@slaopstest.aops.com>, committed by epriestley). · Explain WhyApr 24 2015, 6:49 PM
This revision was automatically updated to reflect the committed changes.