Upstreaming from https://phabricator.wikimedia.org/T186173
Steps to reproduce:
- PHP 8.2.8, Phorge at 7bebfa289aa18e3ff043ea3a5b00d178ec6756e1
- Go to http://phorge.localhost/project/edit/form/default/
- Enter name msslug-parent
- Select Create New Project button
- On http://phorge.localhost/project/view/12/ , select in the left sidebar
- On http://phorge.localhost/project/subprojects/12/ , select in the right sidebar
- On http://phorge.localhost/project/edit/?milestone=12 , enter msslug-milestone in the Name field
- Select Create New Project button
- On http://phorge.localhost/project/view/13/ , see that Hashtags lists nothing
- Construct the URL http://phorge.localhost/tag/msslug-parent and visit it: It works
- On http://phorge.localhost/project/view/13/ , select in the right sidebar
- On http://phorge.localhost/project/edit/13/ , in the Additional Hashtags field, enter msslug-milestoneadd
- Select Save Changes button
- On http://phorge.localhost/project/view/13/ , see that Hashtags lists #msslug-milestoneadd
- Construct the URL http://phorge.localhost/tag/msslug-milestoneadd and visit it
Expected outcome:
http://phorge.localhost/tag/msslug-milestoneadd URL works (accepts the additional hashtag and displays the milestone page), in the same way as such constructed URLs work for subprojects instead of milestones
Actual outcome:
- URL redirects to non-existing http://phorge.localhost/tag//
- Database shows that primarySlug is NULL:
SELECT p.id, p.name, p.primarySlug, s.slug, p.hasWorkboard, p.milestoneNumber FROM phabricator_project.project p INNER JOIN phabricator_project.project_slug s WHERE p.parentProjectPHID IS NOT NULL AND s.projectPHID = p.phid; +----+------------------------+------------------------+-------------------------+--------------+-----------------+ | id | name | primarySlug | slug | hasWorkboard | milestoneNumber | +----+------------------------+------------------------+-------------------------+--------------+-----------------+ | 13 | msslug-milestone | NULL | msslug-milestoneadd | 0 | 1 | | 3 | testproject1subproject | testproject1subproject | testproject1subproject | 1 | NULL | | 3 | testproject1subproject | testproject1subproject | customsubprojecthashtag | 1 | NULL | +----+------------------------+------------------------+-------------------------+--------------+-----------------+
- Typeahead autocomplete in Maniphest task comments (typing #msslug-milestoneadd) works as expected and links the milestone.