Page MenuHomePhabricator

Actually implement an `alias` field on Phurl URL's
Closed, ResolvedPublic

Description

The database column already exists, just need to expose it. Should be an optional field that auto-generates a value if no value is given.

per @epriestley:

The alias would be a unique alphanumeric string like "restart", which could not contain special characters. It also could not be purely numeric (for example, you can't give a link the alias 123, because then U123 and the aliased link would both have the URL /u/123.
If a link has an alias, both /u/2 and /u/restart would still work correctly (adding an alias doesn't break old links). The detail URL is still /U2, and the edit URL is still /phurl/edit/2/ or whatever.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

lpriestley claimed this task.
lpriestley raised the priority of this task from to Normal.
lpriestley updated the task description. (Show Details)
lpriestley added a project: Phurl.
lpriestley added a subscriber: lpriestley.
lpriestley added a revision: Restricted Differential Revision.Nov 3 2015, 6:43 PM
lpriestley added a commit: Restricted Diffusion Commit.Nov 4 2015, 3:09 AM

@epriestley I wrote in the original description (possibly after talking to you):

Should be an optional field that auto-generates a value if no value is given.

But isn't that what the ID already does? Is this still something you think we should do?

I don't think we need to auto-generate (and think it's slightly desirable not to -- I don't think we can do anything reasonable most of the time, and it will tend to make it harder to find a good alias when you actually want one if we do).

lpriestley added a revision: Restricted Differential Revision.Nov 4 2015, 5:03 PM
lpriestley added a commit: Restricted Diffusion Commit.Nov 4 2015, 5:05 PM
lpriestley added a revision: Restricted Differential Revision.Nov 4 2015, 6:01 PM
lpriestley added a commit: Restricted Diffusion Commit.Nov 4 2015, 6:22 PM
lpriestley added a revision: Restricted Differential Revision.Nov 5 2015, 6:13 PM
lpriestley added a commit: Restricted Diffusion Commit.Nov 5 2015, 6:14 PM
lpriestley added a revision: Restricted Differential Revision.Nov 5 2015, 6:50 PM
lpriestley added a commit: Restricted Diffusion Commit.Nov 5 2015, 6:54 PM

I think this is wrapped up. Any loose ends should be added as separate tasks.