1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 18:28:47 +02:00
Commit graph

4197 commits

Author SHA1 Message Date
epriestley
bfa2abed84 Mostly modernize lint views and delete dead code
Summary:
This is a mostly-faithful modernization of the Diffusion lint interfaces. It:

  - Makes them policy aware;
  - removes the last callsites for old/dead code (crumbs, nav).

It's a little rough, but should be perfectly usable. At some point this should get another pass, but probably after we make it easier to populate the lint data.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, FacebookPOC

Differential Revision: https://secure.phabricator.com/D7065
2013-09-23 12:55:47 -07:00
epriestley
0271b051ae Modernize Diffusion "history" view
Summary: Fixes T903. Knock out the side nav, make it policy-aware, other minor cleanup.

Test Plan: See below.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T903

Differential Revision: https://secure.phabricator.com/D7064
2013-09-23 12:55:23 -07:00
epriestley
b3fa9d0c2f Modernize Diffusion "change" view
Summary:
  - Kicks it out to full width.
  - More useful header/crumbs/properties/actions (needs some more work).
  - Works for public repositories.
  - Fix a bug where the "rX" crumb would lose the branch you're on.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7063
2013-09-23 12:54:12 -07:00
epriestley
e7fbfb1eac Remove some old page rendering code from Diffusion
Summary: Get rid of remaining callsites for buildStandardPageResponse() and modernize the UIs.

Test Plan: Looked at branches, tags, and commit detail pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7062
2013-09-23 12:53:55 -07:00
epriestley
d63789e4b2 Allow repository policies to be edited
Summary: Ref T603. Allows permitted users to set view and edit policies for repositories. So far the repository list, repository detail, repository edit, and browse interfaces respect these settings. Most other interfaces will respect stricter settings, but "Public" won't work. Lots of rough edges in the integration still. None of this makes policies any looser than they were already without explicit user intervention, so I just put a warning about it in the UI.

Test Plan: Set a repository to public and browsed it. Verified I could not access non-public repositories.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, davidressman

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7061
2013-09-23 12:53:41 -07:00
epriestley
a09616858b Use RepositoryQuery along common pathways
Summary: Ref T603. Make common repository queries (in Conduit and DiffusionRequest) policy-aware. These tend to get caugh by something else anyway, but tighten them up.

Test Plan: The conduit change already provided `user` everywhere. I verified that and browsed some pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7060
2013-09-21 16:24:08 -07:00
epriestley
e7a7e43104 Fix a bug where policy queries with cursor-based pagers and non-ID orders can go into infinite loops
Summary:
Ref T603. See inlines for an explanation. The case where I hit this was loading the "Pending Differential Revisions" panel in Diffusion when logged out, after making a repository public.

What happens is that we load 10 revisions (say, D1 .. D10) but the user can't see any of them. We then try to load the next 10, but since the pagination is ordered by date modified, we need to base the next query on the modified date of the last thing we loaded (D10). However, since we use the viewer's policies to load that cursor object, it fails to load, and then we just issue the same query over and over again, loading D1 .. D10 until we run out of execution time.

Test Plan: Interface now loads correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7059
2013-09-21 16:23:44 -07:00
epriestley
63818818cb Allow repositories to be activate/deactivated in a transaction-aware way
Summary: Adds activate/deactivate action plus transactions.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7057
2013-09-21 16:23:35 -07:00
epriestley
a82992e9a5 Render Maniphest fields in an application-transactions-compatible way
Summary: Improves transaction rendering for custom fields and standard custom fields.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7054
2013-09-21 16:23:17 -07:00
epriestley
b8cb6ddaa5 Add some keys and policy fields to repositories
Summary:
  - Add some TODO'd keys.
  - Add policy fields.

Test Plan: Viewed repositories; created a new repository and verified it got the right default policy settings.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7056
2013-09-21 16:23:01 -07:00
Gareth Evans
e1892e9bfb Add reCaptcha to password registration
Summary: See task

Test Plan:
Attempt to signup with recaptcha disabled.
Attempt to signup with recaptcha enabled with incorrect value.
Attempt to signup with recaptcha enabled with correct value.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3832

Differential Revision: https://secure.phabricator.com/D7053
2013-09-20 14:54:57 -07:00
epriestley
e8205a2d1e Improve actions for binary files and images in Diffusion
Summary: We currently render something kind of goofy; integrate these with the other actions.

Test Plan: Viewed `aphlict.swf`, some PNG in Diffusion.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7052
2013-09-20 14:43:15 -07:00
epriestley
424f7545fc Split Diffusion "view" preference into blame and color preferences
Summary:
We have this silly "view" preference which has a variety of silly values: "plain", "plainblame", "highlighted", and "blame", and then also "raw", which is magical. This is really just two flags: color on/off, and blame on/off (plus a separate mode for raw).

Express the code in terms of the flags and, e.g., get rid of the state transition tables we had before.

Test Plan: Viewed code in all four modes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7046
2013-09-19 16:01:58 -07:00
epriestley
0139fb9178 Improve organization of Diffusion browse controllers
Summary:
Currently we have this:

  - DiffusionController (abstract, has some random shared browse code)
    - DiffusionBrowseController (concrete, Handles routing, directories, and search)
    - DiffusionBrowseFileController (concrete, handles files)

Instead, do this:

  - DiffusionController (no browse-related code)
    - DiffusionBrowseController (abstract, shared browse code)
      - DiffusionBrowseMainController (concrete, handles routing)
      - DiffusionBrowseDirectoryController (concrete, handles directories)
      - DiffusionBrowseFileController (concrete, handles files)
      - DiffusionBrowseSearchController (concrete, handles search)

Feels a lot cleaner.

Test Plan: Looked at directories, searches, and files.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7045
2013-09-19 16:01:34 -07:00
epriestley
1ec021bf8c Modernize file browse controller
Summary: This needs some more cleanup, but gets us a step closer to something reasonable.

Test Plan: See screenshot.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7043
2013-09-19 16:01:04 -07:00
epriestley
09cdf0de48 Modernize Diffusion browse views
Summary: Broadly, I'm trying to modernize these views and fix UI and at least mitigate mobile problems. See discussion.

Test Plan: See screenshots.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7042
2013-09-19 11:57:33 -07:00
epriestley
3b5f0276d1 Fix issue where 'changeType' is not marshalled across Conduit
Summary: This leads to the "Change" column always showing "Unknown".

Test Plan: "Change" column now shows, e.g., "Contents Modified".

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7041
2013-09-19 11:57:23 -07:00
epriestley
916c4cb78a Add policy header and actions to repositories
Summary: Get thee modernized.

Test Plan: See screenshot.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D7040
2013-09-19 11:57:09 -07:00
epriestley
dc389c90bb Simplify policy header implementation
Summary: Instead of rendering this in all callers, just pass the object into the header and let it figure out how to format it.

Test Plan: Looked at Legalpad, Paste, and Pholio.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D7039
2013-09-19 11:56:58 -07:00
epriestley
8651e5feba Allow repositories to be filtered by type
Summary: Allows the user to query for repos by VCS type.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7038
2013-09-19 11:56:48 -07:00
epriestley
5251e2f14d Remove vestigal AuxiliaryField code from Maniphest
Summary: Gets rid of as much of this as possible. We'll batch handles and remarkup again some day, but after ApplicationTransactions.

Test Plan: Edited, viewed, and checked email for custom field edits.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7037
2013-09-19 11:56:30 -07:00
epriestley
0558d53273 Convert maniphest to use standard fields
Summary: Ref T3794. Drop auxiliary field, use standard field.

Test Plan: Performed migration, field seemed to survive it intact. Edited and viewed tasks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3794

Differential Revision: https://secure.phabricator.com/D7036
2013-09-19 11:56:15 -07:00
epriestley
2088b99078 Normalize validation/requried API
Summary: Makes Maniphest look more like standard fields to make the migration easier.

Test Plan: Edited tasks and users with required and invalid fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7035
2013-09-19 11:55:54 -07:00
epriestley
30159d9ad9 Normalize renderControl API
Summary: Make Maniphest use the standard API, `renderEditControl`. Removes custom method `renderControl`.

Test Plan: Created/edited tasks with custom fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7034
2013-09-19 11:55:45 -07:00
Chad Little
104c6244c3 Policy Header rollout
Summary: Adds policy headers to more (all?) places currently in use.

Test Plan: test each page changed.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7032
2013-09-18 16:27:24 -07:00
epriestley
a17b9cd2a1 Fix Phame fatal
Summary: Fixes T3847.

Test Plan: "Edit Post"

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3847

Differential Revision: https://secure.phabricator.com/D7031
2013-09-18 16:00:03 -07:00
epriestley
3f24232d2b Allow custom fields to have validation logic
Summary:
Ref T418. This is fairly messy, but basically:

  - Add a validation phase to TransactionEditor.
  - Add a validation phase to CustomField.
  - Bring it to StandardField.
  - Add validation logic for the int field.
  - Provide support in related classes.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D7028
2013-09-18 15:31:58 -07:00
epriestley
a025050e87 Fix an issue with differential.getdiff when providing a revision ID
Summary:
If handed a revision ID, we might get more than one result, which causes `executeOne()` to throw. Instead, translate the revision id into a diff ID before querying for the diff.

Also one small consistency change to parameter casing.

Test Plan: Used console to query for a revision with more than one diff using the revision id.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, mbishopim3

Differential Revision: https://secure.phabricator.com/D7026
2013-09-18 15:31:48 -07:00
Bob Trahan
b1dfbda741 Ponder - make feed stories and emails a bit better
Summary: Also some random cleanup now and again. Note reply handler stuff is kind of bojangles bad right now. It didn't work before though either so hey.

Test Plan: asked questions, answered questions, edited answers... the feed pleased my eye

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3653

Differential Revision: https://secure.phabricator.com/D7027
2013-09-18 15:15:25 -07:00
Chad Little
387e3fac66 Roll out more Policy Headers 2013-09-18 14:50:39 -07:00
Chad Little
14aa70a2e0 Only return description in Policy description if no image required
Summary: We were returning an array here when  previous return was a string.

Test Plan: reload diff

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7025
2013-09-18 12:06:07 -07:00
epriestley
cd4cb12116 Minor fix to minor fix to diff order
Summary: We need to preserve keys here; the keys are the diff IDs and are meaningful.

Auditors: btrahan
2013-09-18 11:56:48 -07:00
epriestley
7d26252a3f Use PhutilBugtraqParser in Phabricator
Summary: Fixes T3840. Depends on D7021. See task for discussion. Also improved some config/help stuff.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3840

Differential Revision: https://secure.phabricator.com/D7022
2013-09-18 10:13:00 -07:00
Joel Beales
df8474d778 Conduit - Add option for createcomment to attach draft inline comments
Summary:
Conduit has a query to make a draft inline comment, but createcomment doesn't have the ability to attach them.
Added optional parameter to attach any existing draft comments. Default value is false, so existing api users won't be effected by the change.

Test Plan: Tested no draft comments and multiple draft comments, attach_inlines =true, false, and empty.

Reviewers: vrana

Reviewed By: vrana

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D7019
2013-09-18 10:03:35 -07:00
epriestley
209edcd75a Fix two minor Differential issues
Summary:
  - D6966 accidentally reversed the order of `$diffs`. Reverse it back.
  - The new policy header stuff returns `array(icon, text)` but gets `strlen()`'d by a caller. Silence that warning for now.

Test Plan: Created a revision with several diffs. Saw them in the right order; saw no warning on the diff attach screen.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran, mbishopim3

Differential Revision: https://secure.phabricator.com/D7023
2013-09-18 08:57:16 -07:00
Bob Trahan
52e65f3d47 Add a differential.getdiffs method
Summary: I kind of made a mess of the API doing T2784. I figure just adding this is fine but LMK if you'd prefer something like diffquery got cleaned up more to handle this.  Also adds an idx() call as I was getting errors looking at old diffs. Fixes T3823.

Test Plan: used the new api via test console - great success.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3823

Differential Revision: https://secure.phabricator.com/D6966
2013-09-17 13:55:41 -07:00
epriestley
24e07df434 Restore "Unbreak Now" and "Needs Triage" homepage boxes as cusomizable elements
Summary: Ref T3583. Fixes T3835. Dropbox and Disqus both want these things back, so restore them until we can do something about T3583.

Test Plan: Viewed homepage, clicked "View All X" buttons.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3583, T3835

Differential Revision: https://secure.phabricator.com/D7017
2013-09-17 11:31:32 -07:00
epriestley
bab9a28ab9 Fix excel export of builtin queries
Summary: This works fine for custom queries, but not for builtins.

Test Plan: Exported a builtin query.

Reviewers: btrahan

Reviewed By: btrahan

CC: hach-que, aran

Differential Revision: https://secure.phabricator.com/D7015
2013-09-17 11:30:48 -07:00
epriestley
a695f264bf Make user and project profile links into Maniphest show only open tasks
Summary:
A couple of things here:

  - These links got fixed, but they show all user or project tasks. They should show only open ones.
  - Add an anchor so we jump you straight to the results, since the query UI is like a thousand miles tall now. We might take some other approaches here too, but let's see if this feels reasonable.

Test Plan: Clicked "View Tasks" from Profile and Projects. Executed some queries.

Reviewers: btrahan

Reviewed By: btrahan

CC: euresti, aran, chad

Differential Revision: https://secure.phabricator.com/D7014
2013-09-17 11:30:39 -07:00
Chad Little
e8bb24fd60 Policy, Status in PHUIHeaderView
Summary: The adds the ability to set 'properties' such as state, privacy, due date to the header of objects.

Test Plan: Implemented in Paste, Pholio. Tested various states.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7016
2013-09-17 09:12:37 -07:00
epriestley
01eedd6e6a Make ManiphestCustomField actually implement the interface it ostensibly exposes
Summary: There's a bunch of stuff that lives only in AuxiliaryField which is called on objects which may be ManiphestCustomFields right now. This is basically a list of remaining API methods which need to be moved to the new stuff. This enables construction of new-style custom fields.

Test Plan: Created a sophisticated Maniphest custom field.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7013
2013-09-16 16:05:29 -07:00
epriestley
ed7a5078f9 Add "user" and "users" standard custom fields
Summary: These end up a little weird with subclassing instead of `switch`, but some day we could alias them to one another or something I guess. If I'm feeling brave, I might get rid of the "user" variant when I migrate Maniphest custom field specs, and turn it into "users, limit = 1" or something like that.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7010
2013-09-16 16:04:46 -07:00
epriestley
6115670615 Add a "date" standard custom field
Summary: See previous revisions. As maniphest.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7009
2013-09-16 16:04:31 -07:00
epriestley
ed126cd47e Provide ApplicationSearch hooks in Maniphest
Summary: Ref T418. Adds hooks to support customized ApplicationSearch (you can't currently add indexable fields without writing custom code).

Test Plan: Wrote custom code to add an indexable field.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D7002
2013-09-16 16:03:09 -07:00
epriestley
dd4537edef Route Maniphest editing and transactions primarily through shared code
Summary: Ref T418. Although Maniphest does not use ApplicationTransactions, we can fake a lot of it and provide a more uniform API. Deletes as much custom code from Maniphest as possible along the edit workflows, using core code instead.

Test Plan:
With custom fields:

  - Edited a task.
  - Created a task.
  - Queried a task with Maniphest.
  - Updated a task with Maniphest.
  - Used `?template=nnn` to create a similar task.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D7001
2013-09-16 16:03:01 -07:00
epriestley
7034ac3a5a Route Maniphest detail view through common custom field code
Summary: Ref T418. Run all the meaningful stuff on the detail page out of shared code.

Test Plan: Looked at detail page, saw custom fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D7000
2013-09-16 16:02:27 -07:00
epriestley
bd40e74400 Migrate auxiliary field storage to common field storage
Summary: Ref T418. Moves data from the Maniphest-specific table to the general one. This patch is a bit gross, but mostly about getting the reads and writes aimed correctly. Future patches will clean things up.

Test Plan: Migrated data across formats. Verified it survied the migration. Viewed and edited tasks' custom fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D6999
2013-09-16 16:02:06 -07:00
epriestley
28eaacb491 Remove ManiphestTaskExtensions
Summary: Ref T418. Maniphest has an obsolete class-based field selector. Replace it with CustomField-based selectors, which use the nice config UI and are generally way easier to use.

Test Plan: Added custom fields; edited and viewed custom fields on tasks. Everything worked as expected.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D6998
2013-09-16 15:58:35 -07:00
epriestley
b0e145f2fe Provide generalized custom field storage and custom field indexes in Maniphest
Summary: Ref T418. Depends on D6992. This adds index and value storage for Maniphest custom fields.

Test Plan: Ran storage upgrade.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D6995
2013-09-16 14:06:41 -07:00
epriestley
c8574cf6fd Integrate ApplicationSearch with CustomField
Summary:
Ref T2625. Ref T3794. Ref T418. Ref T1703.

This is a more general version of D5278. It expands CustomField support to include real integration with ApplicationSearch.

Broadly, custom fields may elect to:

  - build indicies when objects are updated;
  - populate ApplicationSearch forms with new controls;
  - read inputs entered into those controls out of the request; and
  - apply constraints to search queries.

Some utility/helper stuff is provided to make this easier. This part could be cleaner, but seems reasonable for a first cut. In particular, the Query and SearchEngine must manually call all the hooks right now instead of everything happening magically. I think that's fine for the moment; they're pretty easy to get right.

Test Plan:
I added a new searchable "Company" field to People:

{F58229}

This also cleaned up the disable/reorder view a little bit:

{F58230}

As it did before, this field appears on the edit screen:

{F58231}

However, because it has `search`, it also appears on the search screen:

{F58232}

When queried, it returns the expected results:

{F58233}

And the actually good bit of all this is that the query can take advantage of indexes:

  mysql> explain SELECT * FROM `user` user JOIN `user_customfieldstringindex` `appsearch_0` ON `appsearch_0`.objectPHID = user.phid AND `appsearch_0`.indexKey = 'mk3Ndy476ge6' AND `appsearch_0`.indexValue IN ('phacility') ORDER BY user.id DESC LIMIT 101;
  +----+-------------+-------------+--------+-------------------+----------+---------+------------------------------------------+------+----------------------------------------------+
  | id | select_type | table       | type   | possible_keys     | key      | key_len | ref                                      | rows | Extra                                        |
  +----+-------------+-------------+--------+-------------------+----------+---------+------------------------------------------+------+----------------------------------------------+
  |  1 | SIMPLE      | appsearch_0 | ref    | key_join,key_find | key_find | 232     | const,const                              |    1 | Using where; Using temporary; Using filesort |
  |  1 | SIMPLE      | user        | eq_ref | phid              | phid     | 194     | phabricator2_user.appsearch_0.objectPHID |    1 |                                              |
  +----+-------------+-------------+--------+-------------------+----------+---------+------------------------------------------+------+----------------------------------------------+
  2 rows in set (0.00 sec)

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418, T1703, T2625, T3794

Differential Revision: https://secure.phabricator.com/D6992
2013-09-16 13:44:34 -07:00
epriestley
b398ae5504 Dispatch Differential edit events from Editor, not Controller
Summary:
Currently, these events don't fire for Conduit updates, which makes them sort of silly.

This will get proper treatment after T2222.

Test Plan: Installed a `throw new Exception(...)` event listener. Performed Conduit and web updates of revisions, saw event listener fire.

Reviewers: btrahan, guywarner

Reviewed By: guywarner

CC: aran

Differential Revision: https://secure.phabricator.com/D7004
2013-09-16 08:04:14 -07:00
epriestley
e36721a9cf Change "Pontificate" text in Serious Business mode
Summary: Fixes T3833. Serious business was seriously disrupted.

Test Plan: Looked at button in both seriousness modes.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3833

Differential Revision: https://secure.phabricator.com/D7003
2013-09-16 08:01:14 -07:00
epriestley
0fa8db1413 Remove ManiphestSavedQuery
Summary: This class is no longer used. It has no callsites.

Test Plan: `grep`

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6996
2013-09-15 17:32:13 -07:00
Jakub Vrana
fed91dc041 Normalize application descriptions 2013-09-13 23:09:37 -07:00
epriestley
c6ea59ae0d Fix some Maniphest links
Summary: A few things link to old URIs for Maniphest, update them.

Test Plan: Clicked all the things.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6989
2013-09-13 16:56:21 -07:00
Bob Trahan
ba37594362 Add support for more granular sending of email in application transactions
Summary: Deploy on paste and macro for create stories, 'cuz those are boring emails. Fixes T3808.

Test Plan: made a paste and a macro. commented on 'em. verified i got mail on comments only.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3808

Differential Revision: https://secure.phabricator.com/D6988
2013-09-13 15:08:17 -07:00
epriestley
a26d3cc3c8 When pagers aren't connected to an ObjectItemListView, put them in a little box
Summary: Pagers in Maniphest (and, to some degree, apps like Pholio) get lost a bit. Put them in a little box.

Test Plan: Looked at Maniphest and Pholio, pager was more obvious and less un-designed-looking.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6987
2013-09-13 14:43:33 -07:00
Bob Trahan
639bab3f89 fix bin/audit to not query whole DB if no commits found
Summary: reported by csilvers in irc

Test Plan: ran a bum query with --trace and verified table scan not run

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6986
2013-09-13 14:13:44 -07:00
epriestley
23c5fccaa3 Clean up dead code from old task list
Summary:
Removes a bunch of dead stuff:

  - Old side nav with hard-coded filters.
  - Old edit/list/delete/update interfaces for those filters.
  - Old `buildStandardPageResponse()`.
  - Some other junk with no callsites.
  - Reduce the number of places where the "Create Task" button is built.

Test Plan: `grep`; used list view, batch editor, reports.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6985
2013-09-13 11:50:29 -07:00
epriestley
d97d8d5fc4 Make Maniphest task priorites user-customizable
Summary: Drive these purely out of configuration after removing behavioral hardcodes in D6981.

Test Plan:
Mucked around with them:

{F58128} {F58129} {F58130}

Reviewers: btrahan

Reviewed By: btrahan

CC: chad, aran

Differential Revision: https://secure.phabricator.com/D6984
2013-09-13 11:50:28 -07:00
epriestley
7139655969 Restore missing "Reports" link to Maniphest
Summary: Accidentally lost this in the melee. Put it back.

Test Plan: Saw link, then clicked it. Great success!

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6982
2013-09-13 11:50:26 -07:00
epriestley
092f540199 Remove all hardcoded behaviors associated with task priorities
Summary:
Ref T3583. Currently, we have some hard-coded behaviors associated with the "Unbreak Now" and "Needs Triage" priorities. Remove them:

  - Users seem somewhat confused by these on occasion, and never seem to think they're cool/useful (that I've seen, at least).
  - I think they have low utility in general, see T3583.
  - Saves three queries on the home page, which can no longer use row counting since they must be policy filtered.
  - Primarily, this paves the way for allowing installs to customize priorities, which is an occasional request.

Also deletes a lot of code with no callsites.

Test Plan: Mostly `grep`. Loaded home page. Viewed reports and task list.

Reviewers: btrahan

Reviewed By: btrahan

CC: chad, aran

Maniphest Tasks: T3583

Differential Revision: https://secure.phabricator.com/D6981
2013-09-13 11:50:15 -07:00
epriestley
91880b5a51 Rename ManiphestTaskListControllerPro to ManiphestTaskListController
Summary: This marks the first time in history that "Pro" has been removed.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6980
2013-09-13 11:49:49 -07:00
epriestley
b558e1b4a4 Remove ManiphestTaskListController
Summary:
Fixes T3273. Fixes T3088. Fixes T2992. Fixes T1163. Fixes T1008. Ref T3241. Ref T1386. Ref T418. Ref T2625. Ref T603.

Replaces task list with one powered by ApplicationSearch.

Test Plan:
After many days of work, the task search interface now looks exactly the same as it did before.

{F58114}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T418, T603, T1008, T1163, T1386, T2625, T2992, T3088, T3241, T3273

Differential Revision: https://secure.phabricator.com/D6979
2013-09-13 11:49:48 -07:00
epriestley
0803f5cb45 Update batch edit and export to excel for "pro" queries
Summary: Point these at the new data and URIs.

Test Plan:
  - Batch edited some tasks.
  - Exported some tasks to excel.

{F58112}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6978
2013-09-13 11:49:47 -07:00
epriestley
a82c3a8914 Allow Maniphest queries to have configurable page sizes
Summary:
Current page size is `1000`. This is nice to have in some cases, but makes pages slower than necessary in others. Task lists are generally dominated by rendering costs.

For example, my default is "recent tasks", which just lists all tasks ordered by date created. Showing 100 tasks here instead of 1000 makes this several times faster without compromising utility.

I don't want to force the default to 100, though, since sometimes listing everything is quite useful and I think an advantage of Maniphest is that it generally deals reasonably well with large task sets.

(This `limit` property is actually read by the default implementation of `getPageSize()` in the parent class.)

Test Plan: Made queries with page sizes 1, 100, 12, 9, 3000, etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6976
2013-09-13 11:49:44 -07:00
epriestley
62e66e3cf6 Completely implement cursor paging in Maniphest
Summary: Ref T2625. Fixes user and project paging. Adds visibility-aware project group filtering.

Test Plan: Set page size very small and paged forward and backward in Maniphest, particularly with "Assigned" and "Project" group-by filters.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6973
2013-09-13 11:49:43 -07:00
epriestley
5062abc534 Most implement cursor paging in Maniphest
Summary:
Ref T2625. Depends on D6971. Maniphest is complicated to implement cursor paging for. Builds on D6971 to do so.

This is //almost// complete. Paging on projects and authors doesn't quite work, I'll clean that up shortly. Left some TODOs.

Test Plan: Set page size to `3`, paged forward and backward in a bunch of group/order modes. Results seemed to be as expected.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6972
2013-09-13 11:49:42 -07:00
epriestley
256fcf3721 Make it easier to construct multi-column paging clauses from Query classes
Summary:
We currently have two giant messes for paging across multiple columns (usually because one column is not unique), and I'm about to add a third for Maniphest.

Provide a more structured way to build these `A > a OR (A = a AND B > b)` clauses.

Test Plan: Set page size to `2` for Differential and Diffusion and paged forward and backward with a bunch of different orders set. Pages worked as expected.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6971
2013-09-13 11:49:41 -07:00
epriestley
c72f3b4bf1 Lock uri.allowed-protocols in Config
Summary: This allows administrative overreach. Administrators can enable `javascript:` and then XSS things if this isn't locked.

Test Plan: Viewed value on web UI, verified it was locked.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6975
2013-09-13 11:48:43 -07:00
epriestley
de10d91963 Make normalization of "#yolo" hashtags less aggressive
Summary: Fixes T3825. See that task for details.

Test Plan: Verified that `#\herp` no longer matches project `#herp`, but `#herp` still works fine.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3825

Differential Revision: https://secure.phabricator.com/D6970
2013-09-13 11:48:11 -07:00
epriestley
7a39ac43b4 Add a "list<regex>" config option and move regex config to it
Summary:
Fixes T3807. Several issues:

  - Currently, we split config of type `list<string>` on commas, which makes it impossible to enter a regex with a comma in it.
    - Split on newlines only.
  - Some of the examples are confusing (provided in JSON instead of the format you actually have to enter them).
    - Show examples in the same format you should enter text.
  - We didn't validate regexps.
    - Introduce `list<regex>` to validate regexes.

@hlau: Note that the old config format for the bugtraq stuff implied the delimiters on the regular expression. They are no longer implied. The examples show the correct format.

Test Plan: Viewed and edited affected config, hitting error and success cases.

Reviewers: btrahan

Reviewed By: btrahan

CC: hlau, aran

Maniphest Tasks: T3807

Differential Revision: https://secure.phabricator.com/D6969
2013-09-13 11:48:00 -07:00
Bob Trahan
ea0dc5625d Purge loadRelativeEdges
Summary:
Fixes T3821. Maybe. The existing code seemed to have a bug and actually return the //commit phid//. Judging by the function name this is not intended.

Also, sorry to step on toes here -- I thought no one was assigned and was curious about loadRelativeEdges and here we are...

Test Plan: lots of logic here as I have no idea how to use Releeph.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3821

Differential Revision: https://secure.phabricator.com/D6967
2013-09-13 11:40:52 -07:00
Bob Trahan
c41c593388 Herald - make dry runs work for "apply once" rules after they have been applied
Summary: Fixes T3719

Test Plan: https://secure.phabricator.com/T3719#comment-7

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3719

Differential Revision: https://secure.phabricator.com/D6968
2013-09-13 11:38:49 -07:00
Chad Little
85424e7472 Small button dropdowns
Summary: Adds the small caret to differential. Cleans up dropdown frame.

Test Plan: Test caret in differential.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6983
2013-09-13 10:48:02 -07:00
epriestley
eca3f44301 Make "pro" controller render results the same way the less-pro controller does
Summary: Swaps the rendering over to the current rendering. This is mostly copy/paste out of TaskListController, which is going to get nuked, with some cleanup.

Test Plan:
{F58064}

  - Ran a bunch of queries.
  - Viewed empty states.
  - Drag-and-dropped stuff.
  - (Batch editor / excel export need a tweak to run the new-style queries.)

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6961
2013-09-12 16:58:09 -07:00
Chad Little
2b4cc8d360 Left and right CSS arrow
Summary: Let's try these out

Test Plan: Tested in Diviner

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6965
2013-09-12 16:08:47 -07:00
Bob Trahan
0ce85df708 Make Herald have "exists" and "not exists" options for differential reviewers on commit rules
Summary: Fixes T1485.

Test Plan: made a herald rule for "not exists". committed to master with no diff. audit was triggered

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T1485

Differential Revision: https://secure.phabricator.com/D6964
2013-09-12 16:00:09 -07:00
Bob Trahan
ab2ae9e47f Differential - make sure not to return change type header if we're not top level
Summary: Followup to D6924. Fixes T3824.

Test Plan: deleted a file in a diff. was able to view file content without JS errors

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3824

Differential Revision: https://secure.phabricator.com/D6963
2013-09-12 16:00:00 -07:00
epriestley
9b3520ea57 Add "group" to Maniphest "pro" search
Summary: This is the last missing filter.

Test Plan: Grouped results by a bunch of stuff.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6960
2013-09-12 14:48:52 -07:00
epriestley
926b47ef70 Call array_unique() in Handle/Object queries
Summary: I think the old thing did this, but this makes queries a bit less ridiculous. For example, `secure.phabricator.com` currently issues a query for 664 handles on my task list, but only 73 of them are unique (basically, all the projects plus all the authors). This proably is slightly good for performance, but mostly makes the "Services" tab manageable.

Test Plan: Looked at Maniphest and some other pages, saw handles and objects where they were expected to be.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6959
2013-09-12 14:48:24 -07:00
epriestley
ddfc6bbc9e Service "Group by: Project" in Maniphest out of a local index
Summary:
See discussion in D6955. Currently, the logic for "Group by: Project" is roughly:

  - Load every possible result.
  - Lots of in-process garbage.

Instead, use the new local project name index (from D6957) to service this query more reasonably. Basically:

  - Join a table which has keyed project names.
  - Order by that table.

Test Plan: {F58033}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6958
2013-09-12 13:08:25 -07:00
epriestley
e50eccf109 Provide and populate an object name index for Maniphest
Summary: See discussion in D6955. This provides a table we can JOIN against to (effectively) "ORDER BY project name", populates it intially, and keeps it up to date as projects are edited.

Test Plan:
  - Ran storage upgrade, verified projects populated into the table.
  - Edited a project, verified its entry updated.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6957
2013-09-12 13:06:44 -07:00
epriestley
da50aef7f2 Add event dispatch for updated search indexes
Summary:
See discussion in D6955. Provide an event for applications and users to update secondary search indexes.

Facebook: I don't recall exactly how all the search stuff is rigged up, but this might provide a more practical / less fragile alternative. I think it publishes into ElasticSearch now, and then intern somehow handles the result merge at display time, implictly relying on Phabricator's storage format? A cleaner approach might be to publish a secondary "intern" index in a standard format.

Test Plan: Ran `bin/search index --type proj --trace`, saw events fire.

Reviewers: btrahan

Reviewed By: btrahan

CC: FacebookPOC, aran

Differential Revision: https://secure.phabricator.com/D6956
2013-09-12 13:05:54 -07:00
epriestley
e96201773d Index projects in the main search index
Summary:
Part one of a large and complicated plot:

  - The last filter for Maniphest "pro" queries is "Group By".
  - This is currently executed in a convoluted and ridiculous way, loading massive amounts of data.
  - The primary reason it works like it does is that we don't have a project name index available in Maniphest, so we can't sort in the DB.
  - So, I want to provide a name index to Maniphest and push this work to the DB.

To do that, my plan is:

  - Index projects in Search.
  - Add a "did update index" event.
  - Have Maniphest listen for it.
  - When projects are updated, update their indexes in Maniphest.
  - Rewrite the giant mess of "group by: project" to be somewhat reasonable.
  - This may also extend to some future "group by: assignee".

This is the first small step down this path, which just indexes projects in search.

Test Plan: Ran `bin/search index --type project`, then searched for projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6955
2013-09-12 13:05:19 -07:00
epriestley
df86f87289 Add a "dateCreated" key to Maniphest
Summary: Depends on D6952. Unpunts there since I'm rolling into a swamp full of schema changes.

Test Plan: Issued date-constrained query and saw key as a candidate.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6954
2013-09-12 13:04:31 -07:00
epriestley
8f8c61be31 Remove legacy "touched" table and indexing
Summary: Noticed this in the schema. "Touches" were an idea that never really got off the ground, as we built out more/better notification channels instead. Essentially, they recorded any object you'd ever interacted with. Maybe this will be useful some day, but for now it does nothing and can't be interacted with. Nuke it.

Test Plan: `grep`, loaded Maniphest.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6953
2013-09-12 13:04:09 -07:00
epriestley
1c43fceffb Add date filtering to Maniphest "pro" search
Summary: Adds date created filtering. There's a task for this somewhere that I can't immediately find.

Test Plan: Filtered tasks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6952
2013-09-12 13:03:39 -07:00
epriestley
bdef58216e Restore project filtering to Maniphest "pro" search
Summary: Restores any/all/user/exclude project filters to the new search.

Test Plan: Filtered stuff by projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6951
2013-09-12 13:03:14 -07:00
epriestley
f679ea7d7e Add "fulltext" to Maniphest pro search
Summary: Restores this field to the new ApplicationSearch-based search.

Test Plan: Used fulltext search to find tasks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6950
2013-09-12 13:03:05 -07:00
epriestley
a3c6e9aebf Move ManiphestTaskQuery into query/
Summary: Move this into a more consistent location.

Test Plan: Loaded Maniphest.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6949
2013-09-12 13:02:55 -07:00
Bob Trahan
b902005bed Kill PhabricatorObjectDataHandle
Summary: Ref T603. Killing this class is cool because the classes that replace it are policy-aware. Tried to keep my wits about me as I did this and fixed a few random things along the way. (Ones I remember right now are pulling a query outside of a foreach loop in Releeph and fixing the text in UIExample to note that the ace of hearts if "a powerful" card and not the "most powerful" card (Q of spades gets that honor IMO))

Test Plan: tested the first few changes (execute, executeOne X handle, object) then got real mechanical / careful with the other changes.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran, FacebookPOC

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6941
2013-09-11 12:27:28 -07:00
Bob Trahan
07b8becfc6 Policy - introduce parentQuery and pass around policy configuration from parent to child
Summary: Ref T603. Ref D6941.

Test Plan: Clicked around all over - looked good. I plan to re-test D6941 to make sure the executeOne case works now as intended

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6944
2013-09-11 12:19:34 -07:00
Guy Warner
b23697eec9 PNG thumbnail compression
Summary: Fixes T3800

Test Plan: upload png and check size

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3800

Differential Revision: https://secure.phabricator.com/D6942
2013-09-11 09:31:28 -07:00
epriestley
0ce3121170 Continue not fataling on legacy Maniphest queries
Summary: Ref T3817. See that task for discussion.

Auditors: btrahan
2013-09-11 08:50:39 -07:00
epriestley
004edbaf7c Don't fatal after failing to load grouped projects in Maniphest
Summary: Fixes T3817. This junk is getting wiped out soon so I'm punting here
and fixing the symptom rather than the root cause.

Auditors: btrahan
2013-09-11 08:44:53 -07:00
epriestley
b91508c045 Fix a second minor merge issue
Auditors: chad, btrahan
2013-09-10 15:42:37 -07:00
epriestley
a4c076ac79 Fix a minor merge issue with a class rename
Auditors: chad, btrahan
2013-09-10 15:41:39 -07:00
epriestley
a8171889bd Add "IDs" and "Priority" to pro search
Summary: Ref T2625. Restore these, too.

Test Plan: Executed queries using these fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6937
2013-09-10 15:34:13 -07:00
epriestley
f386099735 Add support for "status" and "order" to pro search
Summary: Ref T2625. Further expands the "pro" search.

Test Plan: Used new options to query tasks.

Reviewers: btrahan, garoevans

Reviewed By: garoevans

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6935
2013-09-10 15:34:11 -07:00