From 39eceabab785c072483dabb05f2bb27092c9f0e4 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 22 Jan 2016 22:23:25 -0500 Subject: [PATCH] CRM-17857 - Update api explorer to exclude participant joins --- templates/CRM/Admin/Page/APIExplorer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 4c670e43bc..3696c7ce61 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -20,6 +20,10 @@ docCodeTpl = _.template($('#doc-code-tpl').html()), joinTpl = _.template($('#join-tpl').html()), + // The following apis do not support the syntax for joins + // FIXME: the solution is to convert these apis to use _civicrm_api3_basic_get + NO_JOINS = ['Contact', 'Contribution', 'Pledge', 'Participant'], + // These types of entityRef don't require any input to open // FIXME: ought to be in getfields metadata OPEN_IMMEDIATELY = ['RelationshipType', 'Event', 'Group', 'Tag'], @@ -824,7 +828,7 @@ */ function renderJoinSelector() { $('#api-join').hide(); - if (!_.includes(['Contact', 'Contribution', 'Pledge'], entity) && _.includes(['get', 'getsingle'], action)) { + if (!_.includes(NO_JOINS, entity) && _.includes(['get', 'getsingle'], action)) { var joinable = {}; (function recurse(fields, joinable, prefix, depth, entities) { _.each(fields, function(field) { -- 2.25.1