Page MenuHomePhabricator

Add filter by "In Any Project" to differencial search
AbandonedPublic

Authored by sergey.vfx on Mar 6 2015, 2:00 PM.

Details

Reviewers
None
Group Reviewers
Blessed Reviewers
Summary

There was already possible to assign projects to differencial revisions,
but it was not possible to get list of revisions with given project.

This commit is addressed this issue, so now one can get list of revisions
with interesting for him project.

Test Plan

Go to differencial -> advanced search. Fill in "In Any Projects" field.

Diff Detail

Repository
rP Phabricator
Branch
filter_revision_by_any_project
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 4786
Build 4802: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

sergey.vfx updated this revision to Diff 28887.Mar 6 2015, 2:00 PM
sergey.vfx retitled this revision from to Add filter by "In Any Project" to differencial search.
sergey.vfx updated this object.
sergey.vfx edited the test plan for this revision. (Show Details)

We aren't interested in bringing this to the upstream, since we want to pursue a more general solution (see T5595, and prior discussion in D9724).

sergey.vfx abandoned this revision.Mar 6 2015, 2:35 PM

Interesting, and seems still a long way to go tho. Looking forward it's doe in the general way!

@sergey.vfx, thank you for posting this Revision.

As lame as it sounds, not having this feature is basically all that's blocking my company from adopting Phabricator. I recently discussed this with @epriestley on IRC and totally understand his position of not wanting to implement a short-term fix when a longer term solution for filtering by Project is planned in T5595.

We would be OK with rolling something unsupported for now, just to get the basic functionality of grouping Revisions by Project.

So I'm trying to build on this patch and add one more thing: A quick link from the Project overview page to a list of all the Revisions tagged with that Project.

I'm in over my head, honestly, but I figured out that I need to add something like this:

// in: src/applications/project/controller/PhabricatorProjectProfileController.php

    $view->addProperty(
      pht('Revisions'),
      $linkToAssociatedRevisions);

I know we're way off the supported path here, but what is the simplest way to get $linkToAssociatedRevisions to be a link to a Differential search for that Project?

This would more or less unblock us from adopting Phabricator.

$linkToAssociatedRevisions

$link = '/differential/?anyProjects='.$project->getPHID();

Thank you @epriestley, that did it.

For others passing through, this additional patch on top of @sergey.vfx's work gave me what I needed.

diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
index 58551f2..5006950 100644
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -212,6 +212,10 @@ final class PhabricatorProjectProfileController
       pht('Joinable By'),
       $descriptions[PhabricatorPolicyCapability::CAN_JOIN]);
 
+    $view->addProperty(
+      pht('Revisions'),
+      $link = phutil_tag('a', array('href' => '/differential/?anyProjects='.$project->getPHID()), 'Show Revisions'));
+
     $field_list = PhabricatorCustomField::getObjectFields(
       $project,
       PhabricatorCustomField::ROLE_VIEW);

Now to take this back to the team!