Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BjoernE
action-provider
Commits
9ddb1b23
Commit
9ddb1b23
authored
Nov 20, 2019
by
jaapjansma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added privacy options to create individual, household and contact
parent
745d7a41
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
13 deletions
+100
-13
CHANGELOG.md
CHANGELOG.md
+52
-13
Civi/ActionProvider/Action/Contact/CreateUpdateHousehold.php
Civi/ActionProvider/Action/Contact/CreateUpdateHousehold.php
+16
-0
Civi/ActionProvider/Action/Contact/CreateUpdateIndividual.php
.../ActionProvider/Action/Contact/CreateUpdateIndividual.php
+16
-0
Civi/ActionProvider/Action/Contact/CreateUpdateOrganization.php
...ctionProvider/Action/Contact/CreateUpdateOrganization.php
+16
-0
No files found.
CHANGELOG.md
View file @
9ddb1b23
Version 1.9 (not yet released)
-----------
*
Added condition Contact Has Tag.
*
Added contribution recur id parameter to create contribution action.
*
Added receive data parameter to create contribution action.
*
Added action to set value from a parameter.
*
Added action to set contact sub type.
*
Added action to link contribution to membership.
*
Added possibility to create a specification collection for conditions.
*
Added condition to check multiple parameters.
*
Added action to find or create a campaign.
*
Added parameters: join date, start date, end date to the create membership actions.
**New actions**
*
Set value from parameter
*
Set contact subtype
*
Link contribution to membership
*
Find or create a campaign
*
Update membership
*
Set employer
**New conditions**
*
Contact Has Tag.
*
Check multiple parameters
**Changed actions**
_Create update individual_
*
New parameter source
*
New parameter created date
*
New parameter do not mail
*
New parameter do not email
*
New parameter do not phone
*
New parameter do not sms
_Create update household_
*
New parameter source
*
New parameter created date
*
New parameter do not mail
*
New parameter do not email
*
New parameter do not phone
*
New parameter do not sms
_Create update organization_
*
New parameter source
*
New parameter created date
*
New parameter do not mail
*
New parameter do not email
*
New parameter do not phone
*
New parameter do not sms
_Create contribution action_
*
New parameter contribution recur id
*
New parameter receive date
_Create membership action_
*
New parameter join date
*
New parameter start date
*
New parameter end date
**Other changes**
*
Collection specification on conditions.
*
Fixed issue with custom token
*
Added action to update an membership.
*
Added parameters: source and created date to the actions create individual, household and organization.
*
Added action to set employer.
Version 1.8
-----------
...
...
Civi/ActionProvider/Action/Contact/CreateUpdateHousehold.php
View file @
9ddb1b23
...
...
@@ -38,6 +38,18 @@ class CreateUpdateHousehold extends AbstractAction {
if
(
$parameters
->
doesParameterExists
(
'created_date'
))
{
$params
[
'created_date'
]
=
$parameters
->
getParameter
(
'created_date'
);
}
if
(
$parameters
->
doesParameterExists
(
'do_not_mail'
))
{
$params
[
'do_not_mail'
]
=
$parameters
->
getParameter
(
'do_not_mail'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_email'
))
{
$params
[
'do_not_email'
]
=
$parameters
->
getParameter
(
'do_not_email'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_phone'
))
{
$params
[
'do_not_phone'
]
=
$parameters
->
getParameter
(
'do_not_phone'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_sms'
))
{
$params
[
'do_not_sms'
]
=
$parameters
->
getParameter
(
'do_not_sms'
)
?
'1'
:
'0'
;
}
$result
=
civicrm_api3
(
'Contact'
,
'create'
,
$params
);
$contact_id
=
$result
[
'id'
];
$output
->
setParameter
(
'contact_id'
,
$contact_id
);
...
...
@@ -104,6 +116,10 @@ class CreateUpdateHousehold extends AbstractAction {
new
Specification
(
'household_name'
,
'String'
,
E
::
ts
(
'Household name'
),
false
),
new
Specification
(
'source'
,
'String'
,
E
::
ts
(
'Source'
),
false
),
new
Specification
(
'created_date'
,
'Date'
,
E
::
ts
(
'Created Date'
),
false
),
new
Specification
(
'do_not_mail'
,
'Boolean'
,
E
::
ts
(
'Do not mail'
),
false
),
new
Specification
(
'do_not_email'
,
'Boolean'
,
E
::
ts
(
'Do not e-mail'
),
false
),
new
Specification
(
'do_not_phone'
,
'Boolean'
,
E
::
ts
(
'Do not Phone'
),
false
),
new
Specification
(
'do_not_sms'
,
'Boolean'
,
E
::
ts
(
'Do not SMS'
),
false
),
));
ContactActionUtils
::
createAddressParameterSpecification
(
$spec
);
ContactActionUtils
::
createEmailParameterSpecification
(
$spec
);
...
...
Civi/ActionProvider/Action/Contact/CreateUpdateIndividual.php
View file @
9ddb1b23
...
...
@@ -48,6 +48,18 @@ class CreateUpdateIndividual extends AbstractAction {
if
(
$parameters
->
doesParameterExists
(
'created_date'
))
{
$params
[
'created_date'
]
=
$parameters
->
getParameter
(
'created_date'
);
}
if
(
$parameters
->
doesParameterExists
(
'do_not_mail'
))
{
$params
[
'do_not_mail'
]
=
$parameters
->
getParameter
(
'do_not_mail'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_email'
))
{
$params
[
'do_not_email'
]
=
$parameters
->
getParameter
(
'do_not_email'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_phone'
))
{
$params
[
'do_not_phone'
]
=
$parameters
->
getParameter
(
'do_not_phone'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_sms'
))
{
$params
[
'do_not_sms'
]
=
$parameters
->
getParameter
(
'do_not_sms'
)
?
'1'
:
'0'
;
}
$result
=
civicrm_api3
(
'Contact'
,
'create'
,
$params
);
$contact_id
=
$result
[
'id'
];
$output
->
setParameter
(
'contact_id'
,
$contact_id
);
...
...
@@ -117,6 +129,10 @@ class CreateUpdateIndividual extends AbstractAction {
new
OptionGroupSpecification
(
'gender_id'
,
'gender'
,
E
::
ts
(
'Gender'
),
false
),
new
Specification
(
'source'
,
'String'
,
E
::
ts
(
'Source'
),
false
),
new
Specification
(
'created_date'
,
'Date'
,
E
::
ts
(
'Created Date'
),
false
),
new
Specification
(
'do_not_mail'
,
'Boolean'
,
E
::
ts
(
'Do not mail'
),
false
),
new
Specification
(
'do_not_email'
,
'Boolean'
,
E
::
ts
(
'Do not e-mail'
),
false
),
new
Specification
(
'do_not_phone'
,
'Boolean'
,
E
::
ts
(
'Do not Phone'
),
false
),
new
Specification
(
'do_not_sms'
,
'Boolean'
,
E
::
ts
(
'Do not SMS'
),
false
),
));
ContactActionUtils
::
createAddressParameterSpecification
(
$spec
);
ContactActionUtils
::
createEmailParameterSpecification
(
$spec
);
...
...
Civi/ActionProvider/Action/Contact/CreateUpdateOrganization.php
View file @
9ddb1b23
...
...
@@ -38,6 +38,18 @@ class CreateUpdateOrganization extends AbstractAction {
if
(
$parameters
->
doesParameterExists
(
'created_date'
))
{
$params
[
'created_date'
]
=
$parameters
->
getParameter
(
'created_date'
);
}
if
(
$parameters
->
doesParameterExists
(
'do_not_mail'
))
{
$params
[
'do_not_mail'
]
=
$parameters
->
getParameter
(
'do_not_mail'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_email'
))
{
$params
[
'do_not_email'
]
=
$parameters
->
getParameter
(
'do_not_email'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_phone'
))
{
$params
[
'do_not_phone'
]
=
$parameters
->
getParameter
(
'do_not_phone'
)
?
'1'
:
'0'
;
}
if
(
$parameters
->
doesParameterExists
(
'do_not_sms'
))
{
$params
[
'do_not_sms'
]
=
$parameters
->
getParameter
(
'do_not_sms'
)
?
'1'
:
'0'
;
}
$result
=
civicrm_api3
(
'Contact'
,
'create'
,
$params
);
$contact_id
=
$result
[
'id'
];
$output
->
setParameter
(
'contact_id'
,
$contact_id
);
...
...
@@ -104,6 +116,10 @@ class CreateUpdateOrganization extends AbstractAction {
new
Specification
(
'organization_name'
,
'String'
,
E
::
ts
(
'Organization name'
),
false
),
new
Specification
(
'source'
,
'String'
,
E
::
ts
(
'Source'
),
false
),
new
Specification
(
'created_date'
,
'Date'
,
E
::
ts
(
'Created Date'
),
false
),
new
Specification
(
'do_not_mail'
,
'Boolean'
,
E
::
ts
(
'Do not mail'
),
false
),
new
Specification
(
'do_not_email'
,
'Boolean'
,
E
::
ts
(
'Do not e-mail'
),
false
),
new
Specification
(
'do_not_phone'
,
'Boolean'
,
E
::
ts
(
'Do not Phone'
),
false
),
new
Specification
(
'do_not_sms'
,
'Boolean'
,
E
::
ts
(
'Do not SMS'
),
false
),
));
ContactActionUtils
::
createAddressParameterSpecification
(
$spec
);
ContactActionUtils
::
createEmailParameterSpecification
(
$spec
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment