Page MenuHomePhabricator

Projects - smooth out scenarios around renaming a project and slugs
ClosedPublic

Authored by btrahan on Feb 5 2015, 7:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 3:09 AM
Unknown Object (File)
Wed, Dec 25, 7:09 AM
Unknown Object (File)
Tue, Dec 17, 2:20 AM
Unknown Object (File)
Mon, Dec 9, 2:22 AM
Unknown Object (File)
Sat, Nov 30, 3:58 AM
Unknown Object (File)
Nov 28 2024, 5:50 PM
Unknown Object (File)
Nov 26 2024, 3:03 AM
Unknown Object (File)
Nov 25 2024, 4:35 AM
Subscribers

Details

Summary

Fixes T7092. When you name project "Foo" which has primary hashtag "foo" to "Foobar", post this patch the hashtag "foo" gets added as a secondary hashtag. Also makes sure we don't normalize the hashtags in the query function as the wikimedia folks were hitting an issue around capitalization on the hashtag.

Note that T6909 remains "broken" in that you get an error that you can't do that, though if you just omit the additional hashtag it would work fine. I think if a fix is necessary here the best bet would be to simply detect this particular scenario and let things proceed; its a bit tricky though since its about two transactions about to be applied and how they interact with one another...

Test Plan

Made project "Foo" which has primary hashtag "foo". Renamed it to "Foobar" and verified "foo" was added as a secondary hashtag and "foobar" was the primary hashtag. Renamed it again to "Foo" and noted that the hashtags all ended up correct.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Projects - smooth out scenarios around renaming a project and slugs.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.

Slug add/remove stuff looks good, less sure about normalization removal. Leaving T6909 "broken" seems fine to me.

src/applications/project/query/PhabricatorProjectQuery.php
281–284

I'd imagine that this might make /tag/Phabricator/ stop working for /tag/phabricator/, etc., but it seems like it should work. Does it still work / was there more detail on the issue that this fixes? I couldn't find anything obvious in the linked tasks.

Particularly, right now, /tag/QuAcK/ will correctly redirect to /tag/quack/, and all of #quack, #QUACK, etc., will work in remarkup -- do they after this patch?

epriestley edited edge metadata.
This revision is now accepted and ready to land.Feb 6 2015, 11:49 PM
src/applications/project/query/PhabricatorProjectQuery.php
281–284

I see different behavior right now...

https://secure.phabricator.com/project/details/2/ (has phabricatorcli, PHABCLI for tags..)

WORKS - https://secure.phabricator.com/tag/phabricator-cli/
FAILS - https://secure.phabricator.com/tag/PHABCLI/ - note no redirect or anything

...so what this patch does is make the second bit work. (On one of those issues wikimedia reported secondary hashtags not working and I narrowed it down to this case issue...)

Hrrm, alright. QUACK goes to quack for me locally, but maybe I did something weird. As long as it's working, I think we're good. If we figure out something's broken we can add some unit tests when we fix it.

This revision was automatically updated to reflect the committed changes.