Page MenuHomePhabricator

Sprint Extension Raise Error with the newest Phabricator
Closed, ResolvedPublic

Description

I tried to run the newest Phabricator with Sprint Extension yesterday.
But I got below Exceptions. Could you fix it?

Case 1:

Unhandled Exception ("PhabricatorDataNotAttachedException")
Unhandled Exception ("PhabricatorDataNotAttachedException")

Attempting to access attached data on ManiphestTask (via getProjectPHIDs()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it. Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly.
Stack Trace

Depth	Library	File	Where
6	phabricator	applications/maniphest/storage/ManiphestTask.php : 150	PhabricatorLiskDAO::assertAttached()
5	phutil	utils/utils.php : 114	ManiphestTask::getProjectPHIDs()
4	sprint	controller/SprintProjectProfileController.php : 190	mpull()
3	sprint	controller/SprintProjectProfileController.php : 80	SprintProjectProfileController::renderTasksPage()
2	phabricator	aphront/AphrontController.php : 33	SprintProjectProfileController::processRequest()
1		/srv/www/phabricator/phabricator/webroot/index.php : 103	AphrontController::handleRequest()

Case 2:

Unhandled Exception ("PhabricatorDataNotAttachedException")

Attempting to access attached data on ManiphestTask (via getProjectPHIDs()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it. Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly.
Stack Trace

Depth	Library	File	Where
23	phabricator	applications/maniphest/storage/ManiphestTask.php : 150	PhabricatorLiskDAO::assertAttached()
22	sprint	storage/SprintTransaction.php : 25	ManiphestTask::getProjectPHIDs()
21	sprint	view/SprintDataView.php : 89	SprintTransaction::buildDailyData()
20	sprint	view/SprintDataView.php : 114	SprintDataView::buildChartDataSet()
19	sprint	view/SprintDataView.php : 44	SprintDataView::buildC3Chart()
18	phabricator	view/AphrontView.php : 159	SprintDataView::render()
17	phutil	markup/render.php : 132	AphrontView::producePhutilSafeHTML()
16	phutil	markup/render.php : 154	phutil_escape_html()
15	phutil	markup/render.php : 154	phutil_escape_html()
14	phutil	markup/render.php : 154	phutil_escape_html()
13	phutil	markup/render.php : 118	phutil_escape_html()
12	phabricator	view/layout/AphrontSideNavFilterView.php : 297	phutil_tag()
11	phabricator	view/layout/AphrontSideNavFilterView.php : 184	AphrontSideNavFilterView::renderFlexNav()
10	phabricator	view/AphrontView.php : 159	AphrontSideNavFilterView::render()
9	phutil	markup/render.php : 132	AphrontView::producePhutilSafeHTML()
8	phutil	markup/render.php : 186	phutil_escape_html()
7	phabricator	view/page/PhabricatorBarePageView.php : 58	phutil_implode_html()
6	phabricator	view/page/PhabricatorStandardPageView.php : 109	PhabricatorBarePageView::willRenderPage()
5	phabricator	view/page/AphrontPageView.php : 46	PhabricatorStandardPageView::willRenderPage()
4	phabricator	applications/base/controller/PhabricatorController.php : 307	AphrontPageView::render()
3	sprint	controller/SprintDataViewController.php : 55	PhabricatorController::buildApplicationPage()
2	phabricator	aphront/AphrontController.php : 33	SprintDataViewController::processRequest()
1		/srv/www/phabricator/phabricator/webroot/index.php : 103	AphrontController::handleRequest()

Event Timeline

Timesking raised the priority of this task from to Needs Triage.
Timesking updated the task description. (Show Details)
Timesking changed Security from none to None.
Timesking added a subscriber: Timesking.

Change 181716 had a related patch set uploaded (by Christopher Johnson (WMDE)):
Fixes breaking upstream change 'Maniphest - introduce needProjectPHIDs'

https://gerrit.wikimedia.org/r/181716

Patch-For-Review

FYI: This is also an unresolved upstream problem. Check it here https://secure.phabricator.com/maniphest/report/project/

Warning: https://secure.phabricator.com/rP83db5965ab6c640864fb8b66d813369274d40594 breaks phabricator.wikimedia.org unless change 181716 is merged.

This highlights a delicate issue which is the need to route through the Sprint "fork" of the PhabricatorProjectProfileController in order to offer different menu options for Sprint Projects than regular ones.

I do not like this way of routing because it requires too much maintenance with upstream, and the project profile page is an important site in the application. The routing alternatives are not that many because there is a lot of functional overlay with projects in other apps, like search, that provide standard routes to the project profile. The SprintUIEventListener is one possibility of decoupling Sprint from Projects more gracefully. Reference: T78384

Christopher triaged this task as High priority.Dec 24 2014, 3:33 AM
Christopher moved this task from Backlog to Done on the Phabricator-Sprint-Extension board.

The SprintProjectProfileController and the route overrides from SprintApplication have been removed in favor of leaving the button for Workboard (even on Sprint Projects), but adding a new Action Menu item for the Sprint Board.

This is definitely a saner and safer way to do add Sprint Boards.

Also, this upstream change breaks the task detail view via the custom field implementation which is modified in patch set 5 of change 181716.

Change 181716 merged by Christopher Johnson (WMDE):
Fixes breaking upstream change 'Maniphest - introduce needProjectPHIDs'

https://gerrit.wikimedia.org/r/181716

Change 181729 had a related patch set uploaded (by Christopher Johnson (WMDE)):
fixes SprintBoardTaskEditController

https://gerrit.wikimedia.org/r/181729

Patch-For-Review

Change 181729 merged by Christopher Johnson (WMDE):
fixes SprintBoardTaskEditController

https://gerrit.wikimedia.org/r/181729

Christopher closed this task as Resolved.Jan 14 2015, 3:25 PM