Page MenuHomePhorge

Add "Authored Tasks" view / item to user profile menu
Needs ReviewPublic

Authored by aklapper on Feb 18 2025, 07:57.

Details

Summary

The sidebar menu items in the People view (user profiles) currently include User, Tasks, Revisions, Commits, Badges, Manage.
Tasks implicitly refers to assigned tasks, while Revisions implicitly refers to authored revisions.
However, some (maybe less developer workflow oriented) users have expected Tasks to link to their authored tasks instead.
Thus add an additional menu item called Authored Tasks which allows a quick view of the tasks created by the user.

Also be more explicit about the relationship between user and objects by adding an adjective ("Authored", "Assigned", "Received") to their names.
We have two Tasks related items now, so we need to differentiate anyway.

Closes T15998

fix some lint stuff

Test Plan
  • As user1, create tasks and assign tasks to yourself.
  • Go to http://phorge.localhost/p/user1/ and click the menu items in the sidebar, including the new option "Authored Tasks".
  • Click both "Assigned Tasks" and "Authored Tasks" in the sidebar on http://phorge.localhost/p/user1/ and get results displayed.
  • Being logged in, on a default installation go to http://phorge.localhost/maniphest/ to still see your assigned tasks and "Assigned" and "Authored" as Query options in the sidebar (no change in behavior).

Diff Detail

Repository
rP Phorge
Branch
arcpatch-D25889
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1942
Build 1942: arc lint + arc unit

Event Timeline

For consistency, I'm wondering whether to

  • rename src/applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php to src/applications/people/menuitem/PhabricatorPeopleTasksAssignedProfileMenuItem.php,
  • rename src/applications/people/controller/PhabricatorPeopleProfileTasksController.php to src/applications/people/controller/PhabricatorPeopleProfileTasksAssignedController.php,
  • update const ITEM_TASKS = 'people.tasks' to const ITEM_TASKS_ASSIGNED = 'people.tasks.assigned;,
  • update 'tasks/(?P<id>[1-9]\d*)/' =>'PhabricatorPeopleProfileTasksController' to 'tasks-assigned/(?P<id>[1-9]\d*)/' =>'PhabricatorPeopleProfileTasksAssignedController'

as there is more than one "task" thingie now?

Rename source files from Tasks to TasksAssigned for consistency; update two more exposed strings

Hmm, maybe should not change ->setURI("/people/tasks/{$id}/") because there might be external third-party code relying on this?

Hmm, maybe should not change ->setURI("/people/tasks/{$id}/") because there might be external third-party code relying on this?

Sounds reasonable. If not, the patch could be landed as is and we can mention a breaking change for the Assigned Tasks URI in the Change Log.

Don't change URI path /people/tasks/{$id}/ of assigned tasks not to break potential external linking

Keep route / path in both places as tasks-assigned/ for consistency

Should have "Breaking changes" section in release notes / Changelog as this might break a link in third-party code.

src/applications/people/application/PhabricatorPeopleApplication.php
71–72

It's probably not desired to break old URLs like http://phorge.localhost/people/tasks/1/

We can probably give backward compatibility by keeping the route but changing the controller name