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

5523 commits

Author SHA1 Message Date
epriestley
e814291526 Introduce ManiphestTaskSearchEngine plus ManiphestTaskListControllerPro
Summary:
Ref T603. Ref T2625. Cutting this over is tricky because of Maniphest's existing saved queries. Plan here is:

  - Build out the "pro" controller at `/maniphest/query/`.
  - Once it's at parity, migrate custom queries.
  - Nuke the old UI.

This provides a minimal implementation with no filter support.

Test Plan: Looked at `/maniphest/query/`, saw results technically available.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2625

Differential Revision: https://secure.phabricator.com/D6933
2013-09-10 15:34:08 -07:00
epriestley
1f86c73428 Simplify policy filtering for projects and ObjectQuery
Summary:
Ref T603. Moves to detangle and optimize how we apply policies to filtering objects. Notably:

  - Add a short circuit for omnipotent users.
  - When performing project filtering, do a stricter check for user membership. We don't actually care if the user can see the project or not according to other policy constraints, and checking if they can may be complicated.
  - When performing project filtering, do a local check to see if we're filtering the project itself. This is a common case (a project editable by members of itself, for example) and we can skip queries when it is satisfied.
  - Don't perform policy filtering in ObjectQuery. All the data it aggregates is already filtered correctly.
  - Clean up a little bit of stuff in Feed.

Test Plan: Pages like the Maniphest task list and Project profile pages now issue dramatically fewer queries.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6931
2013-09-10 15:34:07 -07:00
epriestley
1e42c62b8f Make ManiphestTaskQuery a (mostly) policy-aware query
Summary: Ref T603.

Test Plan: Viewed home and maniphest, fiddled all the knobs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6930
2013-09-10 15:34:06 -07:00
epriestley
a2571de575 Remove obsolete/deprecated withTaskIDs() / withTaskPHIDs()
Summary: Ref T603. These were deprecated some time ago in favor of the more standard withIDs() / withPHIDs().

Test Plan: `grep`, loaded some interfaces.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6929
2013-09-10 15:34:04 -07:00
epriestley
e625c91867 Pass viewer to all ManiphestTaskQuery objects
Summary: Ref T603. Prepare for conversion to a policy-aware query.

Test Plan: Browsed various interfaces which use this stuff.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6928
2013-09-10 15:34:03 -07:00
epriestley
5651141520 Make Maniphest custom fields extend PhabricatorCustomField
Summary:
Ref T418. These implementations share no method names, so we can safely just move Maniphest fields into the `PhabricatorCustomField` hierarchy.

Replaces two Maniphest-specific custom field exceptions which nothing catches.

Test Plan: Viewed Maniphest, edited/altered custom fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D6927
2013-09-10 15:31:48 -07:00
epriestley
e8126fa958 Don't mangle inline comments with tables in them in Differential
Summary:
Fixes T3814. Broadly, remarkup tables in inline comments did not work properly. I ran into several messes here and cleaned up some of them:

  - Some of this code is doing `JX.$N('div', {}, JX.$H(response.markup))`, to turn an HTML response into a node, passing that around, and then doing junk with it. This is super old and gross.
    - The slightly more modern pattern is `JX.$H(response.markup).getFragment().firstChild`, but this is kind of yuck too and not as safe as it could be.
    - Introduce `JX.$H(response.markup).getNode()`, which actually expresses intent here. We have a bunch of `getFragment().firstChild` callsites which should switch to this, but I didn't clean those up yet because I don't want to test them all.
    - Switch the `JX.$N('div', {}, JX.$H(response.markup))`-style callsites to `JX.$H(response.markup).getNode()`.
  - `copyRows()` is too aggressive in finding `<tr />` tags. This actually causes the bug in T3814. We only want to find these tags at top level, not all tags. Don't copy `<tr />` tags which belong to some deeper table.
  - Once this is fixed, there's another bug with mousing over the cells in tables in inline comments. We select the nearest `<td />`, but that's the cell in the remarkup table. Instead, select the correct `<td />`.
  - At this point, these last two callsites were looking ugly. I provided `findAbove()` to clean them up.

Test Plan: Created, edited, deleted, moused over, and reloaded a revision with inline comments including remarkup tables. Used "Show more context" links.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3814

Differential Revision: https://secure.phabricator.com/D6924
2013-09-10 15:31:32 -07:00
epriestley
51eb8a301a Clean up Diffusion repository list
Summary: Simplify rendering of the repository list. For inactive repositories, mark them disabled.

Test Plan: {F57615}

Reviewers: btrahan, rockybean

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6921
2013-09-10 15:29:46 -07:00
epriestley
c74ebf9ce0 Restore repository shortcuts, for now
Summary:
These need to die soon since they're not structurally policy-aware, but keep them around for the moment until we can replace them.

There is no UI to create these, and only Facebook has them.

Test Plan: {F57614}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6920
2013-09-10 15:29:42 -07:00
epriestley
0da6321b2c Provide ordering options in Diffusion application search
Summary: Fixes T2298. Allows repositories to be ordered by name, callsign, commit, or date created. Slightly messy because of cursor paging.

Test Plan: Sorted commits.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2298

Differential Revision: https://secure.phabricator.com/D6919
2013-09-10 15:29:37 -07:00
epriestley
9872d57f87 Allow Diffusion repostories to be filtered by active/inactive status
Summary: Adds a status filter and makes the default query "active" repositories.

Test Plan: Used new filter to execute queries.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6918
2013-09-10 15:26:23 -07:00
epriestley
904add9f44 Use ApplicationSearch in Diffusion
Summary:
Ref T2625. Switches Diffusion to ApplicationSearch. Notes:

  - Rendering is a bit rough, I'll clean that up next.
  - Ordering is a bit arbitrary, also coming shortly.

Test Plan: Used `/diffusion/` to execute various searches.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6917
2013-09-10 15:26:08 -07:00
epriestley
b4728104f8 Rename DiffusionHomeController to DiffusionRepositoryListController
Summary: Improves consistency across applications.

Test Plan: Loaded `/diffusion/`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6916
2013-09-10 15:24:44 -07:00
epriestley
19eeafa303 Remove lint message counts from Diffusion repository list
Summary: We should bring these back some day, but they should be denormalized, inside the query, and there should be a better pipeline to build them in the first place. Just get rid of them for now; this essentially impacts only us.

Test Plan: Loaded `/diffusion/`, same page minus lint counts.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, vrana

Differential Revision: https://secure.phabricator.com/D6915
2013-09-10 15:24:28 -07:00
epriestley
93c6704059 Move "most recent commit" and "commit count" into DiffusionRepositoryQuery
Summary: Ref T2625. `DiffusionHomeController` currently runs these queries inline. Move them into `DiffusionRepositoryQuery`. Prepareds for ApplicationSearch.

Test Plan: Loaded `/diffusion/`, saw the same content as before.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6914
2013-09-10 15:22:41 -07:00
epriestley
8e45b466da Improve voicing in text published to JIRA issues
Summary:
Ref T3687. JIRA is able to piggyback on a fair amount of Asana infrastructure, but the voicing we use on Asana tasks (which are always about one object) isn't very good for JIRA issues (which may have many linked objects). Specifically, we publish stories like this to Asana:

  alincoln accepted this revision.

This is meaningless in JIRA since you have no idea what it's talking about. Instead, publish like this:

  alincoln accepted D999: Put a bird on it

Additionally, supplement it with a URI, so the total story text we publish is:

  alincoln accepted D999: Put a bird on it

  https://phabricator.whitehouse.gov/D999

Signifcantly less useless!

Test Plan: {F57523} {F57524}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6907
2013-09-10 15:22:24 -07:00
epriestley
3a28f86a6e Refactor shared code between JIRA + Asana publishers into a base class
Summary:
Ref T3687. See some discussion in D6892. The JIRA doorkeeper publisher shares a reasonable amount of code with the Asana publisher. Remedy this:

  - Create `DoorkeeperFeedWorker`, where shared functionality lives (mostly related to building story context objects).
  - Push responsibility for enabling/disabling a worker into this new layer, via `isEnabled()`. This allows `FeedPublisherWorker` to dynamically find and schedule doorkeeper publishers, so third parties can add additional doorkeeper publishers.
  - Some general cleanup/documentation.

Test Plan: Used `bin/feed republish` to republish stories about objects with JIRA and Asana links. Verified that doorkeeper publishers activated properly, made calls, and published events into the remote systems.

Reviewers: btrahan, akopanev22

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6906
2013-09-10 15:22:01 -07:00
Chad Little
c5298004ce Color atom-class-name
Summary: Making these purple.

Test Plan: Reload a few class pages, looks nice.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6938
2013-09-10 14:43:42 -07:00
Bob Trahan
11fd4c60f2 Phortune - fix fatal from initial load
Summary: the attachX upgrade means we need to blank this out formally when creating a new object. Fixes https://github.com/facebook/phabricator/issues/383

Test Plan: loaded phortune for the first time - no fatal and it worked!

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6939
2013-09-10 14:39:40 -07:00
Chad Little
93f735ed2f Diviner Book Index styles
Summary: Slightly more readable, less space than current index. LMK if you hate it though.

Test Plan: Look at user and dev book indexes.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6932
2013-09-10 09:39:50 -07:00
Chad Little
ab1f8fa7a4 Diviner CSS, layout updates
Summary: Moves book view to use PHUIDocument, fix some other spacing issues.

Test Plan: Review a number of pages in Diviner.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6925
2013-09-10 07:26:00 -07:00
Chad Little
3fcd8429f5 Merge branch 'master' of github.com:facebook/phabricator 2013-09-10 07:25:32 -07:00
Chad Little
b4424ec53a Update look of Diviner docs index 2013-09-09 15:13:39 -07:00
Eric Stern
16895e1099 Add "diffusion.createcomment" conduit endpoint
Summary:
Adds most of Diffusion's commenting options available in the web UI

Mark method as deprecated immediately per @epriestley's request

Test Plan:
Used the Conduit web console to check:
* Lookup by PHID works
* Error is raised if commit by PHID is not found
* "action" validation works and raises appropriate error
* "message" raises error if empty
* Actions to raise concern or accept commit work
* Method is marked as deprecated from the start

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6923
2013-09-09 14:25:18 -07:00
Chad Little
5ba20b8924 Move PhabricatorObjectItem to PHUIObjectItem, add 'plain' setting for lists.
Summary: Adds plain support for object lists that just look like lists

Test Plan: review UIexamples and a number of other applications

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6922
2013-09-09 14:14:34 -07:00
epriestley
d1225e782b Don't try to load user profile images in PhabricatorPeopleQuery if no users have any
Summary:
Fixes T3810. In PhabricatorPeopleQuery, we issue an unnecessary query like this:

  SELECT f.* FROM file f WHERE (f.phid IN ('')) ORDER BY f.id DESC

...if we're loading a user without a profile picture. Filter the file PHIDs before loading them to prevent this.

This doesn't change anything, but saves us a spurious/silly query.

Also makes `PhabricatorPeopleProfileController` use `needProfileImage()`, moving us closer to getting rid of `loadProfileImageURI()` eventually.

Test Plan: Looked at profiles of users with and without profile pictures. Checked query log in DarkConsole.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3810

Differential Revision: https://secure.phabricator.com/D6913
2013-09-08 09:43:27 -07:00
epriestley
194245ed62 Clean up some more Diviner stuff
Summary:
Ref T988.

  - Render "Implements:" as tags, too.
  - Minor CSS tweak to tags in property lists.
  - Add a bunch of group patterns to the Phabricator book.
  - Fix some stuff with how hashes are computed and cached.
  - Minor tweak to reuse the Diviner engine for slightly improved performance.

Test Plan: Regenerated and looked at documentation.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3811, T988

Differential Revision: https://secure.phabricator.com/D6912
2013-09-08 09:16:55 -07:00
epriestley
f1dc56a687 Muck around with Diviner method documentation display
Summary:
Ref T988. Not sure about this, feel free to push back or tweak it or whatever, but I want to reduce the amount of meta-text in the method documentation. Primarily this:

  - Shortens "From parent implementation in ClassName:" to "ClassName".
  - Tries to tweak the styles a bit so that it's relatively obvious what that means (hopefully?).
  - Fixes an issue with tasks where some methods could be ignored.

Test Plan: {F57565}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6911
2013-09-08 09:15:22 -07:00
epriestley
0c95c6c4b8 Use tags/links to show extended classes in Diviner, and fix a minor empty state thing
Summary: Ref T988. Show "Extends:" as linked tags. Fix the style of "This <top-level thing, like a class or function>" is not documented so it's the same as "This method is not documented.".

Test Plan:
Tags thing before:

{F57557}

Tags thing after:

{F57558}

Undoc before:

{F57559}

Undoc after:

{F57560}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6910
2013-09-08 09:13:46 -07:00
epriestley
c280634a7a Link and summarize methods in the "Tasks" view of a Diviner class
Summary: Ref T988. Make this more useful, and link it to the methods it describes.

Test Plan:
Before:

{F57553}

After:

{F57554}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6909
2013-09-08 09:12:33 -07:00
epriestley
2367b64229 Render Diviner atom signatures on one line
Summary:
Ref T988. Instead of rendering this:

  ClassName
  final class ClassName

  methodName
  final public function methodName(...)

...just render this:

  final class ClassName

  final public function methodName(...)

Also link and anchor the method names.

Test Plan:
Before:

{F57536}
{F57537}

After:

{F57538}
{F57539}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6908
2013-09-08 09:11:59 -07:00
Chad Little
4cc40933c4 Color consolidation
Summary: Another pass at consolidating colors

Test Plan: Test various pages and UI elements

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6905
2013-09-07 09:13:55 -07:00
Chad Little
d06788c1e5 Move Workboards to PHUI
Summary: This is just renaming to PHUI (I like shorter text :)

Test Plan: reload workboard examples page, seems to not fatal and looks very appealing

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6904
2013-09-06 14:06:12 -07:00
epriestley
b4d9a8d547 Add a "before" parameter to feed.query
Summary: See IRC. We already have "after", add the corresponding "before". This makes polling for updates much easier.

Test Plan: Ran queries with "before" and "after".

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6903
2013-09-06 10:45:08 -07:00
Chad Little
78cbfc3a02 Fix extra divs in PHUIBoxView
Summary: This moves the outer classes to the outmost div

Test Plan: Reviewed a few PHUIBox pages

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6902
2013-09-06 10:42:44 -07:00
Guy Warner
03783c4f63 Alert user that projects/ is protected in Phriction
Summary: Fixes T3447 - adds check if slug is projects/ alerts user

Test Plan: Create new doc in Phriction. Type projects/whatever and get error

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3447

Differential Revision: https://secure.phabricator.com/D6901
2013-09-06 10:42:02 -07:00
epriestley
95dc69a30e Fix "Show All Changes" button in Diffusion
Summary: See IRC. We currently render a "show all changes" button for commits which have more than 100 but fewer than 1000 changes, but it doesn't actually do anything. Make it do what it's supposed to.

Test Plan: Set the limit to 2; clicked the button.

Reviewers: chad, staticshock, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6900
2013-09-06 10:05:24 -07:00
epriestley
a40861e5c6 Publish Doorkeeper object stories to JIRA
Summary:
Ref T3687. Publish stories into JIRA.

These need some voicing fixes, which maybe involves straightening out the feed code. For example, they're voiced in-context ("updated this revision") when they should be voiced out-of-context ("updated D123").

Generally, this is similar to the Asana stuff but a lot simpler since we don't need to do any state management.

Test Plan: {F57366}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6892
2013-09-05 16:51:20 -07:00
epriestley
470bb4931b Fix a warning in the JIRA field
Summary: Ref T3687. The `value` property may be `null`.

Test Plan: Loaded a revision with the JIRA field enabled but no issues attached, no longer saw a warning about a bad argument to `foreach()`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6890
2013-09-05 16:51:13 -07:00
epriestley
2d240142c8 Fix 20130820.file-mailkey-populate.php for databases in strict mode
Summary:
Fixes T3803. Turns out my advice was sort of terrible. :/

In strict mode, the `INSERT INTO x (y, z)` raises an error unless `(y, z, ...)` includes //all// columns without default values.

Test Plan: Ran `storage upgrade` on a strict-mode install. Verified no inserts were performed.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3803

Differential Revision: https://secure.phabricator.com/D6894
2013-09-05 15:58:28 -07:00
Bob Trahan
228496cdbe File - add transactions and editor
Summary: this ends up being a little weird since you can't actually edit files. Also, since we create files all sorts of ways, sometimes without even having a user, we don't  bother logging transactions for those events. Fixes T3651. Turns out this work is important for T3612, which is a priority of mine to help get Pholio out the door.

Test Plan: left a comment on a file. it worked! use bin/mail to verify mail content looked correct.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran, wez

Maniphest Tasks: T3651, T3612

Differential Revision: https://secure.phabricator.com/D6789
2013-09-05 13:11:02 -07:00
Chad Little
4b061a766a More Diviner style updates
Summary: This adds a number of new styles for Diviner documentation. Not sure I've covered all the bases or wrote this in the most efficient manner, but passing it along now for early review before tightening everything up.

Test Plan: Review various class pages.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6888
2013-09-05 12:29:07 -07:00
epriestley
a3d4f4c457 Fix an issue with darkconsole.always-on and logged-out users
Summary:
Fixes T3796. When this got split out into tabs, the data endpoints were accidentally locked down. Open them up again if the setting is on.

Also, when you open/close the console we try to save the preference. Just no-op if you're logged out. Previously, you'd see the requests in DarkConsole since they failed.

Test Plan: Enabled `darkconsole.always-on` and toggled the console on and off as a logged-out user. Disabled the preference and verified it was no longer accessible.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3796

Differential Revision: https://secure.phabricator.com/D6886
2013-09-05 11:16:32 -07:00
Guy Warner
fc82e81fe2 Add isExplicitUpload to true on macro uploads
Summary: Fixes T3798. Macros now show up as manually uploaded

Test Plan: Upload a macro, go to file, new macro is visiable

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3798

Differential Revision: https://secure.phabricator.com/D6887
2013-09-05 10:22:07 -07:00
epriestley
0ae7335316 Add missing (int) casts to Herald rule editing
Summary: Fixes T3792. These raise errors if the database is in strict mode and you try to create an "any" rule.

Test Plan: Created a rule with "any".

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3792

Differential Revision: https://secure.phabricator.com/D6883
2013-09-04 12:07:26 -07:00
Chad Little
589f1c7696 Diviner CSS tweaks
Summary: Update Diviner table layouts, make it purty.

Test Plan: test many diviner pages

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6880
2013-09-04 11:50:57 -07:00
epriestley
4252c93c8a Remove block of commented-out code
Summary: I left a clamp in the patient.

Test Plan: derp-a-derpderp

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6882
2013-09-04 11:02:12 -07:00
Andrew Gallagher
8bba3f280d Only associate branch with task if maniphest is enabled
Summary:
Previously, maniphest tasks would get upated by diffs on branches
with tasky names, even if maniphest was disabled.

Test Plan:
Tested createing a diff in sandbox with maniphest disabled, on a
git branch named using the format "t###".  Without this change,
if there happened to be a task in the maniphest DB which matched,
it was updated an email was sent to users.

Reviewers: epriestley

Reviewed By: epriestley

CC: wez, slawekbiel, whhone, Korvin, aran

Differential Revision: https://secure.phabricator.com/D6881
2013-09-03 18:22:01 -07:00
epriestley
853544b54a Add "JIRA Issues" field to Differential
Summary:
Ref T3687. This adds a field which allows you to link Differential Revisions to JIRA issues.

This is just about as basic as it can get, but gets the job done. The field enables itself if you have a JIRA auth provide. You enter JIRA issues in a comma-delimited format and it generates appropriate edges.

Nothing is pushed to the issues yet.

The only real rough part here is that if you commandeer a revision which is linked to issues you can't see, editing it is difficult via the CLI. This seems pretty much like a non-issue, but at some point we can let the field throw some kind of "RecoverableInvalidFieldException" which just warns the user. The "no reviewers, continue anyway?" prompt could then use that too.

Test Plan:
  - Edited via web UI, tried valid/invalid edits, checked that edges showed up in the database, added/removed issues, clicked issue links.
  - Edited via CLI, tried valid/invalid edits.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6879
2013-09-03 17:27:51 -07:00
epriestley
825fb9c85a Add JIRA doorkeeper and remarkup support
Summary:
Ref T3687. Adds a Doorkeeper bridge for JIRA issues, plus remarkup support. In particular:

  - The Asana and JIRA remarkup rules shared most of their implementation, so I refactored what I could into a base class.
  - Actual bridge implementation is straightforward and similar to Asana, although probably not similar enough to really justify refactoring.

Test Plan:
  - When logged in as a JIRA-connected user, pasted a JIRA issue link and saw it enriched at rendering time.
  - Logged in and out with JIRA.
  - Tested an Asana link, too (seems I haven't broken anything).

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6878
2013-09-03 17:27:38 -07:00