Page MenuHomePhorge

Alternative hashtag of milestone has no primary slug, thus project URL redirects to 404 /tag//
Open, Needs TriagePublic

Description

Upstreaming from https://phabricator.wikimedia.org/T186173

Steps to reproduce:

  1. PHP 8.2.8, Phorge at 7bebfa289aa18e3ff043ea3a5b00d178ec6756e1
  2. Go to http://phorge.localhost/project/edit/form/default/
  3. Enter name msslug-parent
  4. Select Create New Project button
  5. On http://phorge.localhost/project/view/12/ , select Subprojects in the left sidebar
  6. On http://phorge.localhost/project/subprojects/12/ , select Create Milestone in the right sidebar
  7. On http://phorge.localhost/project/edit/?milestone=12 , enter msslug-milestone in the Name field
  8. Select Create New Project button
  9. On http://phorge.localhost/project/view/13/ , see that Hashtags lists nothing
  10. Construct the URL http://phorge.localhost/tag/msslug-parent and visit it: It works
  11. On http://phorge.localhost/project/view/13/ , select Edit Details in the right sidebar
  12. On http://phorge.localhost/project/edit/13/ , in the Additional Hashtags field, enter msslug-milestoneadd
  13. Select Save Changes button
  14. On http://phorge.localhost/project/view/13/ , see that Hashtags lists #msslug-milestoneadd
  15. 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:

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.

Event Timeline

Is there anything that generates this URL? Is there a broken link generated anywhere?

Is there anything that generates this URL? Is there a broken link generated anywhere?

Not that I know, and not that I know. As https://phorge.example.com/tag/foo links work when foo is an alternative hashtag for a subproject, it's only an expectation that also https://phorge.example.com/tag/bar links work when bar is an alternative hashtag for a milestone.