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

10724 commits

Author SHA1 Message Date
epriestley
8d6209b701 Don't require users be activated in order to establish Web sessions
Summary: Ref T8496. In D13123, the condition for establishing a web session was made too strict: we need to let non-activated users establish web sessions in order to see "you are a bad disabled person" or "your account needs approval" messages. The previous behavior let them in, the new behavior incorrectly locks them out.

Test Plan: Enabled login approvals and registered a new account with username/password auth.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8496

Differential Revision: https://secure.phabricator.com/D13239
2015-06-10 15:34:02 -07:00
Joshua Spence
5a00b5f6f6 Garbage collect old notifications
Summary: Fixes T8473. Adds garbage collection to the `phabricator_feed.feed_storynotification` table.

Test Plan: Reduced the TTL to a really small value and ran the trigger daemon. Saw feed notifications removed from the database.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8473

Differential Revision: https://secure.phabricator.com/D13233
2015-06-11 06:55:13 +10:00
Paul Kassianik
72fc3da416 Add a "Date Updated (Oldest First)" sort order to Maniphest
Summary: Closes T8484

Test Plan: Create sample tasks then navigate to Maniphest > Advanced Search and choose choose "Date Updated (Oldest First)" in the "Order By" select box.

Reviewers: lpriestley, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8484

Differential Revision: https://secure.phabricator.com/D13237
2015-06-10 12:21:12 -07:00
epriestley
57b898af9a Merge branch 'master' into redesign-2015 2015-06-10 07:44:58 -07:00
lkassianik
c075f7f63f Allow safe editing of recurring events
Summary: Ref T8472, Allow safe editing of recurring events

Test Plan: Create recurring event, edit event, everything but date-related fields should be editable

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8472

Differential Revision: https://secure.phabricator.com/D13230
2015-06-09 17:22:08 -07:00
epriestley
bdef1255e3 Make "Order By" field render correctly when showing a SavedQuery with an order alias
Summary:
If you have a saved query with an order alias, we currently apply the order correctly but don't show the right value in the UI.

Map any saved value to the canoncial value when rendering the control.

Test Plan: Added some `var_dump()` and verified order key was getting mapped forward correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13227
2015-06-09 13:49:01 -07:00
Bob Trahan
0fab38e022 Conpherence - fix default widget on main Conpherence view.
Summary: Fixes T8489. Regression in D13058. Re-write this so a) works and b) works as well cross browser as possible. (big guess on b)

Test Plan: visited /Z1 vs /Z1?settings and saw people widget vs settings widget as respective defaults.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8489

Differential Revision: https://secure.phabricator.com/D13228
2015-06-09 13:48:47 -07:00
epriestley
9c82881cac Fix "unmarked 0 inline comments as not undone" transactions
Summary:
Fixes T8483. I did this incorrectly in D13159, by doing it correctly first and then editing it carelessly. For most transaction types, it didn't matter, but did for inline state.

Also, clean up any bad inline state transactions.

Test Plan:
  - Ran migration, bad transactions vanished.
  - Marked some inline comments as done.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8483

Differential Revision: https://secure.phabricator.com/D13226
2015-06-09 13:30:45 -07:00
epriestley
b8b4279a8a Use SearchFields in Maniphest
Summary:
Ref T8441. Ref T7715. Move Maniphest to SearchFields.

The only new tech here is hiding fields, which we use to hide some fields on the dashboard query UI.

Test Plan:
  - Queried by each field, including custom fields.
  - Used some standrad queries.
  - Used dashboards, used standard + custom queries.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13225
2015-06-09 13:17:31 -07:00
Joshua Spence
f47e69c015 Mark some strings for translation
Summary: Add some more `pht`izations.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13200
2015-06-09 23:06:52 +10:00
epriestley
5397779ee2 Try using a less-rich but less-risky thread title in Conpherence handles
Summary: Ref T8478. This is easier than I thought, let's see if it's conspicious?

Test Plan:
  - Embedded `{Z2}` and saw "Private Correspondence".
  - Still saw normal stuff with useful participant lists/titles in all main UIs.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8478

Differential Revision: https://secure.phabricator.com/D13220
2015-06-09 05:50:49 -07:00
lkassianik
7015520b93 Add helper method on event object to determine if event is the parent of a recurrence.
Summary: Ref T8472, Add helper method on event object to determine if event is the parent of a recurrence.

Test Plan: No user facing change.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8472

Differential Revision: https://secure.phabricator.com/D13221
2015-06-08 21:40:32 -07:00
epriestley
8915fd8be8 Don't try to generate a CSRF token for the omnipotent user
Summary:
We can end up here with a stack trace like this, while rendering an embedded Slowvote trying to publish a Feed story:

```
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000] [2015-06-08 22:49:57] EXCEPTION: (PhutilProxyException) Error while executing Task ID 830591. {>} (PhabricatorDataNotAttachedException) Attempting to access attached data on PhabricatorUser (via getAlternateCSRFString()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000] 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. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:166]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000] arcanist(head=master, ref.master=7d15b85a1bc0), phabricator(head=master, ref.master=929f5f22acef), phutil(head=master, ref.master=92882eb9404d)
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #0 <#2> PhabricatorLiskDAO::assertAttached(string) called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:556]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #1 <#2> PhabricatorUser::getAlternateCSRFString() called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:432]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #2 <#2> PhabricatorUser::generateToken(integer, integer, string, integer) called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:344]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #3 <#2> PhabricatorUser::getRawCSRFToken() called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:357]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #4 <#2> PhabricatorUser::getCSRFToken() called at [<phabricator>/src/infrastructure/javelin/markup.php:91]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #5 <#2> phabricator_form(PhabricatorUser, array, array) called at [<phabricator>/src/applications/slowvote/view/SlowvoteEmbedView.php:169]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #6 <#2> SlowvoteEmbedView::render() called at [<phabricator>/src/view/AphrontView.php:175]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #7 <#2> AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #8 <#2> phutil_escape_html(SlowvoteEmbedView)
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #9 <#2> array_map(string, array) called at [<phutil>/src/markup/engine/remarkup/PhutilRemarkupBlockStorage.php:56]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #10 <#2> PhutilRemarkupBlockStorage::restore(PhutilSafeHTML, integer) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:299]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #11 <#2> PhutilRemarkupEngine::restoreText(PhutilSafeHTML, integer) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:295]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #12 <#2> PhutilRemarkupEngine::postprocessText(array) called at [<phabricator>/src/infrastructure/markup/PhabricatorMarkupEngine.php:138]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #13 <#2> PhabricatorMarkupEngine::process() called at [<phabricator>/src/applications/feed/story/PhabricatorFeedStory.php:167]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #14 <#2> PhabricatorFeedStory::loadAllFromRows(array, PhabricatorUser) called at [<phabricator>/src/applications/feed/query/PhabricatorFeedQuery.php:37]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #15 <#2> PhabricatorFeedQuery::willFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:237]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #16 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:168]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #17 <#2> PhabricatorPolicyAwareQuery::executeOne() called at [<phabricator>/src/applications/feed/worker/FeedPushWorker.php:12]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #18 <#2> FeedPushWorker::loadFeedStory() called at [<phabricator>/src/applications/feed/worker/FeedPublisherWorker.php:6]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #19 <#2> FeedPublisherWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:91]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #20 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:162]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #21 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #22 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:185]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #23 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125]
```

Just return `null`.

Test Plan: Will check that tasks clear in production.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13218
2015-06-08 16:07:21 -07:00
epriestley
929f5f22ac Fix an issue with adding or updating images in unified diff view
Summary: Fixes T8069.

Test Plan: Viewed a new image in unified diff view.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8069

Differential Revision: https://secure.phabricator.com/D13217
2015-06-08 15:40:10 -07:00
epriestley
7f5919de1c Don't load attached files for profile images
Summary:
Ref T8478. I think the cycle is:

  - Conpherence Thread > Loads handle for participant > loads file for profile image > loads attached files to check visibility > loads conpherence thread > ...

So, specifically, someone attached their profile image to a thread or message somewhere.

This breaks the cycle by stopping the attached-files visibility check from happening, since we don't need it. This seemed like the easiest link in the chain to break.

//Ideally//, I think the longer-term and more complete fix here is to stop Conpherence from requiring handles in order to load thread handles (and, generally, having a "handles must not load other handles" rule), but that's not trivial and might not be especially practical.

Test Plan: Will test in production.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8478

Differential Revision: https://secure.phabricator.com/D13216
2015-06-08 15:39:47 -07:00
epriestley
d6afce7d30 Stop "join project" from trying to write an inverse edge on Users
Summary: Now that Users implement PhabricatorApplicationTransactionInterface, we try to write an inverse edge. At least for now, we should retain the old behavior instead.

Test Plan:
  - Unit tests which cover this stuff pass again.
  - Grepped for other `instanceof PhabricatorApplicationTransactionInterface`, the all seemed either benign or irrelevant.

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13215
2015-06-08 14:45:22 -07:00
Joshua Spence
af1b586990 Fix method visibilities
Summary: See also D13186.

Test Plan: Ran `arc unit --everything`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13201
2015-06-09 07:17:44 +10:00
Bob Trahan
818fcf0035 Conpherence - fix durable column message duplicating bug
Summary: Fixes T6713. Though I've said that before. =D Looks like this handler wasn't upgraded earlier and was still updating the DOM; removing the DOM updating code and let the central spot handle everything and this works fine.

Test Plan: open up two browsers with durable column on same room. send messages in browser a and observe 1 copy of each message showing up in browser b. send messages in browswer b and observe one copy in browser a. browser a was chrome and browser b was firefox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6713

Differential Revision: https://secure.phabricator.com/D13214
2015-06-08 14:13:23 -07:00
epriestley
3bb7f3624f Implement PhabricatorApplicationTransactionInterface on PhabricatorUser
Summary: Right now, "Publish" workers for user profile edits (title / blub) can get gummed up in the daemons. Implement the interfaces and provide a Query so they can go through.

Test Plan:
  - Made a profile "Title" edit.
  - Used `bin/worker execute --id <id>` to see task fail.
  - Applied patch.
  - Saw task work.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13213
2015-06-08 13:35:57 -07:00
epriestley
1a091e5260 Drive Maniphest grouping and ordering through standard infrastructure
Summary: Ref T8441. Ref T7715. Ref T7909. Clean up all the ordering and grouping hacks in Maniphest so we can drive it through normal infrastructure, move it to SearchField, introduce Spaces, and eventually modernize the Conduit API.

Test Plan:
  - Executed all grouping/ordering queries, including custom queries.
  - Forced execution with old aliases; got modern results.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7909, T7715, T8441

Differential Revision: https://secure.phabricator.com/D13197
2015-06-08 12:23:13 -07:00
epriestley
d4a3706aee Move Repositories to SearchField
Summary: Ref T8441. Ref T7715. Internalizes `setQueryOrder()`. Removes `appendOrderFieldsToForm()`.

Test Plan: Used all Repository search fields.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13196
2015-06-08 12:22:47 -07:00
epriestley
b611642a0f Convert Harbormaster Build Plans to SearchField
Summary: Ref T8441. Ref T7715. Removes `saveQueryOrder()`.

Test Plan: Used all search features for build plans.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13195
2015-06-08 12:22:28 -07:00
epriestley
1de0ba58c1 Convert Macro to SearchFields
Summary: Ref T8441. Ref T7715. I'm primarily clearing callers to `saveQueryOrder()` so I can get rid of it.

Test Plan: Used all Macro search features.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13194
2015-06-08 12:22:09 -07:00
epriestley
bf87976d25 Support ordering in SearchField
Summary:
Ref T8441. Ref T7715. Automatically generate a modern "Order" control in ApplicationSearch for engines which fully support SearchField.

Notably, this allows the standard "Order" control to automatically support custom field orders. We do this in Maniphest today, but in an ad-hoc way.

Test Plan: Performed order-by queries in Almanac (Services), Pholio, Files, People, Projects, and Paste.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13193
2015-06-08 12:21:48 -07:00
epriestley
3cdaf52ce9 Make Subscribers automatically provide working SearchFields
Summary:
Ref T8441. Ref T7715. For modern Query classes, automatically make subscriber queries and SearchField integrations work.

In particular, we can just drive this query with EdgeLogic and don't need to do anything specific on these Query classes beyond making sure they're implemented in a way that picks up all of the EdgeLogic clauses.

Test Plan:
  - Searched for subscribers in Pholio, Files, Paste, and Projects.
  - Searched for all other fields in Projects to check that Query changes are OK.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13191
2015-06-08 12:20:53 -07:00
epriestley
3e2b0c35f9 Move People to SearchFields
Summary:
Ref T8441. Ref T7715. This is the second of three ApplicationSearch + CustomField use cases (Maniphest is the third).

Also add a way to set a default ordering for the fields.

Test Plan:
  - Performed searches with each field.
  - Added a custom field and searched for it.
  - Observed desired ordering.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13190
2015-06-08 12:20:35 -07:00
epriestley
c8b866a956 Move Projects to SearchFields
Summary:
Ref T8441. Ref T7715. This is mostly about getting SearchFields + CustomFields working.

(This includes a couple of SearchFields which aren't used quite yet.)

Test Plan:
  - Used all search controls.
  - Defined custom fields and searched for them.
  - Created an old saved search which searches on custom fields on master, switched to this patch, search worked exaclty as written.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13189
2015-06-08 12:20:16 -07:00
lkassianik
ace7505f2e Check if recurrence end date is disabled before saving it.
Summary: Ref T8357, Check if recurrence end date is disabled before saving it.

Test Plan: Create new event, before saving, leave "recurrence end date" unchecked, save, should not get an error.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8357

Differential Revision: https://secure.phabricator.com/D13212
2015-06-08 11:58:45 -07:00
lkassianik
973101cae6 Correctly display event id and sequence in crumb and page title on eventviewcontroller
Summary: Fixes T8459, Correctly display event id and sequence in crumb and page title on eventviewcontroller

Test Plan: Open `E111/3`, crumb and title should display '`E111 (3)`' instead of '`E111`'.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8459

Differential Revision: https://secure.phabricator.com/D13211
2015-06-08 11:05:54 -07:00
epriestley
c3b11439f2 Apply Herald subscription effects immediately
Summary:
Fixes T8464. We could incorrectly use a cached value when computing CC's.

Just load a fresh value. There are no other callers that would benefit from this cache, so it's more complicated to reload it correctly prior to publishing than to just skip it.

Also make the PHID headers unique.

Test Plan:
  - Verified that users received mail about the transactions which caused them to be added to an object.
  - Veirfied that headers no longer have redundant values.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8464

Differential Revision: https://secure.phabricator.com/D13206
2015-06-08 10:50:13 -07:00
epriestley
49570cb1c4 Fix an issue with mention transactions in Calendar
Summary:
Fixes an issue where mentioning an event name (like `E999`) in a revision summary (and probably elsewhere) would produce an error like this:

```
2015/06/08 17:30:22 [error] 27702#0: *307450 FastCGI sent in stderr: "PHP message: [2015-06-08 17:30:22] EXCEPTION: (Exception) Transaction ("PHID-XACT-CEVT-zglgzy36aote5ja", of type "core:edge") requires a handle ("PHID-DREV-4m6vorimvg4bm3ltskca") that it did not load. at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:285]
PHP message: arcanist(head=master, ref.master=8c589f1f759f), phabricator(head=master, ref.master=b4de79741ceb), phutil(head=master, ref.master=4a0e1b47a584)
PHP message:   #0 <#2> PhabricatorApplicationTransaction::getHandle(string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:474]
PHP message:   #1 <#2> PhabricatorApplicationTransaction::shouldHide() called at [<phabricator>/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php:82]
PHP message:   #2 <#2> PhabricatorCalendarEventTransaction::shouldHide() called at [<phutil>/src/utils/utils.php:428]
PHP message:   #3 <#2> mfilter(array, string, boolean) called at [<phabricator>/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php:350]
PHP message:   #4 <#2> PhabricatorCalendarEventEditor::shouldSendMail(PhabricatorCalendarEvent, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:990]
PHP message:   #5 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorCalendarEvent, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2937]
PHP message:   #6 <#2> PhabricatorApplicationTransactionEditor::applyInverseEdgeTransactions(DifferentialRevision, DifferentialTransaction, integer) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:602]
...
```

This is similar to rP98aae51c / rP0fc0af64, but for Calendar. (Likely, I copy/pasted the Editor from Maniphest a while ago.)

We don't need to do this filtering here because we do it later before sending mail. Additionally, because some transactions may hide or show depending on the viewer, it's strictly incorrect to do it here.

Test Plan:
  - Created a revision which mentioned a bunch of events.
  - Grepped for other implementations of `shouldSendMail()` and verified that none try to perform similar filtering.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, lpriestley

Differential Revision: https://secure.phabricator.com/D13210
2015-06-08 10:48:49 -07:00
epriestley
00d1aea56f Migrate Herald conditions and actions after mailing list changes
Summary:
Ref T8455. It looks like for at least some installs, there are a lot of rules which use mailing lists and they aren't easy to just manually go fix.

Migrate conditions and actions of known types which contain mailing list PHIDs from old MLST PHIDs to new USER PHIDs.

Test Plan:
  - Created a "Subscribers include..." condition using a mailing list, migrated it forward into a user.
  - Created a "add ccs..." action including a mailing list, migrated it forward into a user.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13184
2015-06-08 10:32:32 -07:00
epriestley
9e88ede69d Use standard subscribers effects in Herald Adapter for revisions
Summary:
Ref T8455. Use standard effects for revisions, instead of a custom effect.

This fixes the major issue (conduit error) in T8455 because the standard effect now performs PHID type filtering.

This retains other behaviors (in particular: not re-CC'ing explicitly removed CCs).

Test Plan:
  - With a Herald rule that adds a mailing list as a CC, created a revision before the change and hit the error in T8455. After the change, saw correct behavior.
  - Wrote a normal Herald rule to add CCs and created a revision, saw it fire properly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13183
2015-06-08 10:32:08 -07:00
epriestley
1e918eecfa Use standard subscribers effects in Herald Adapter for tasks
Summary: Ref T8455. Use the standard effect in task rules, instead of a custom effect.

Test Plan: Wrote a Maniphest CC rule, updated a task, saw rule activate properly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13182
2015-06-08 10:31:53 -07:00
epriestley
ab5f7a868e Use standard subscribers effects in Herald Adapter for commits
Summary: Ref T8455. Use the standard actions in commit rules, instead of a custom action.

Test Plan: Wrote an "add cc" Herald rule for commits, pushed a commit, saw the rule fire correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13181
2015-06-08 10:31:38 -07:00
epriestley
e2b0f814d4 Use standard subscribers effects in Herald Adapter for Phriction
Summary: Ref T8455. Instead of using an ad-hoc subscribers effect in Phriction, use the new standard one (introduced previously; this depends on D13178).

Test Plan:
  - Wrote an "add subscribers" Herald rule, updated a Phriction document, saw it apply its effect.
  - Observed availability of "remove" subscribers actions.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13180
2015-06-08 10:31:09 -07:00
epriestley
ee4c7268fe Make "ADD_CC" and "REMOVE_CC" available as "standard" Herald effects
Summary:
Ref T8455. Begins consolidating the code for applying these effects:

  - Makes Add/Remove subscribers a standard effect, and uses it in Pholio.
  - This includes the "don't re-subscribe users who have explicitly unsubscribed" logic from Differential in the standard effect. I think this rule is always desirable.
  - This adds new filtering of invalid PHID types to resolve the `arc diff` issue in T8455 once Differential uses this standard effect.
  - Added "Remove Subscribers" to MockAdapter in order to test that it works.
  - Relabeled "CC" in Pholio to "Subscribers" for consistency.

Test Plan:
  - Created several rules which add subscribers to (and remove subscribers from) mocks.
  - Updated mocks, changing properties and adding and removing subscribers.
  - Observed transactions applying and aggregating properly.
  - Observed add/remove rules each working correctly.
  - Observed the "don't re-add unsubscribed users" condition acting on subscribers who had previously been added but explicitly removed/unsubscribed.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13179
2015-06-08 10:30:22 -07:00
epriestley
ce434e821c Make ACTION_NOTHING a "standard" action in Herald
Summary: Ref T8455. Multiple adapters implement essentially identical effects for ACTION_NOTHING. Consolidate them.

Test Plan: Created several `ACTION_NOTHING` rules and updated the corresponding objects.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13178
2015-06-08 10:30:09 -07:00
epriestley
623aaf488d Consolidate "Subscribers" Herald field value logic
Summary:
Ref T8455. The Herald code in general isn't nearly as modular as it should be, and the subscriber code particularly has some legacy cruft. This is making it fragile and causing the issue described in T8455.

Currently, each Herald adapter has essentially identical code which it uses to determine which users are subscribed to an object. Instead, share code between object types.

I removed "explicitCCs":

  - The value was always identical to doing the query in the common/standard way.
  - They were only used to print a diagnostic message on transcripts, which I think is no longer relevant.
    - I believe it predates transactions, so when it was added you couldn't figure out the old object state by looking at the transaction history. Now, CC changes are recorded there, so there's no need to restate the CC state on the transcript.
    - Even if we do want to restore this (or something similar), we can do it directly from Herald now.

Test Plan:
  - Created rules that use the "CCs" field in Herald, Pholio, Maniphest and Differential.
  - Updated objects in each application.
  - Observed valid field reads in the tranascript.
  - Grepped for `FIELD_CC`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13177
2015-06-08 10:18:01 -07:00
epriestley
2e0f189950 Fix an issue with extended policy checks and @mentions
Summary: Ref T8463.

Test Plan:
  - Created a new revision via web UI with a username `@mention` in the summary and no repository.
  - Prior to patch, hit a "not attached" error.
  - After patch, no error.
  - Created a new web UI revision, as above, but with a repository; saw repository work fine.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8463

Differential Revision: https://secure.phabricator.com/D13205
2015-06-08 10:07:05 -07:00
Joshua Spence
9a9df74ddb Minor documentation improvements
Summary: Tidying up of documentation, adding some new groups.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13133
2015-06-08 11:36:40 +10:00
Joshua Spence
7eac4865ab Add an index to the story notification table
Summary: Fixes T8433. Add an index to the `phabricator_feed.feed_storynotification` table. Primarily, this speeds up object destruction.

Test Plan: Ran `./bin/storage upgrade` and saw the migration apply cleanly.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8433

Differential Revision: https://secure.phabricator.com/D13164
2015-06-08 11:28:49 +10:00
Joshua Spence
b6e2f0087e Rename some remarkup classes
Summary: Ref T5655. Rename `DoorkeeperRemarkupRuleAsana` and `DoorkeeperRemarkupRuleJIRA` for consistency.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D13165
2015-06-08 11:27:20 +10:00
Joshua Spence
5914bbd806 Remove *TransactionType classes
Summary: Remove the `*TransactionType` classes and define the constants in the corresponding `*Transaction` class instead.

Test Plan: `grep`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13188
2015-06-08 11:26:43 +10:00
Joshua Spence
259b40fc28 Fix some method visibilities
Summary: See D13185, the `testMethodVisibility()` test was not being executed.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13186
2015-06-08 09:52:14 +10:00
lkassianik
47051643c7 Show informative errors when attempting to set a recurrence end date on a non-recurring event.
Summary: Fixes T8458, Show informative errors when attempting to set a recurrence end date on a non-recurring event.

Test Plan: Create new event, set recurrence end date via date-picker without setting the "is recurring" checkbox, and attempt to save. Should get error saying there cannot be a recurrence end date on a non-recurring event.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8458

Differential Revision: https://secure.phabricator.com/D13192
2015-06-07 15:57:19 -07:00
epriestley
ecc4c531c9 Stop threading handles through the CustomField + ApplicationSearch pipeline
Summary:
Ref T8441. Ref T7715.

  - These are obsolete after the Viewer/HandlePool changes.
  - These are unused after the typeahead parameterization changes.

Test Plan: `grep`, poked around.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13176
2015-06-07 07:32:46 -07:00
epriestley
cdef3e8bc8 Convert Files to SearchFields
Summary:
Ref T8441. Ref T7715.

  - Update FileSearchEngine.
  - Nothing too special/fancy.

Test Plan:
  - Searched for various files.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13175
2015-06-07 07:32:09 -07:00
epriestley
2492fef029 Move Pholio to SearchFields
Summary:
Ref T8441. Ref T7715.

  - Update PholioSearchEngine.
  - Automatically add project fields.
  - Update Paste to support project search.
  - Simplify common Query class construction.

Test Plan:
  - Searched for pastes.
  - Searched for mocks.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13174
2015-06-07 07:31:28 -07:00
Joshua Spence
64b690f23f Add some missing translations
Summary: I saw these appear untranslated in the feed on https://secure.phabricator.com.

Test Plan: Created a dependency and checked the story text in `/feed/`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13149
2015-06-07 16:59:59 +10:00