Skip to content

Commit

Permalink
HCX-10 Add custom fields in create and update in PlanadoV2 class
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Smirnov committed Feb 20, 2020
1 parent a021889 commit 750c9f1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ v1.4.2 [unreleased]
- [#38](https://github.com/latera/camunda-ext/pull/38) Add method for job updating into PlanadoV2 class
- [#33](https://github.com/latera/camunda-ext/pull/33) Allow to pass goodValueId into hid.Hydra#getGoodAddParamsBy
- [#24](https://github.com/latera/camunda-ext/pull/24) Add methods for files to document attaching
- [#39](https://github.com/latera/camunda-ext/pull/39) Add custom fields in create and update methods in PlanadoV2 class

### Bugfixes
- [#27](https://github.com/latera/camunda-ext/pull/27) Remove redundant get methods from hid.Hydra class
- [#27](https://github.com/latera/camunda-ext/pull/27) Remove redundant get methods from hid.Hydra class
- [#28](https://github.com/latera/camunda-ext/pull/28) Fix return types of HID class methods
- [#30](https://github.com/latera/camunda-ext/pull/30) Fix wrong Self-Care app id passing into method calls
- [#26](https://github.com/latera/camunda-ext/pull/26) Fix passing appCode into hid.Hydra#mainInit method
Expand Down
28 changes: 16 additions & 12 deletions src/org/camunda/latera/bss/connectors/PlanadoV2.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ class PlanadoV2 {
LinkedHashMap payload = [
external_id : extId,
organization : true,
organization_name : data.companyName ?: '',
organization_name : data.companyName ?: '',
site_address : [
formatted : data.addressStreet ?: '',
entrance_no : data.addressEntrance ?: '',
floor : data.addressFloor ?: '',
apartment : data.addressApartment ?: '',
description : data.addressDescription ?: ''
formatted : data.addressStreet ?: '',
entrance_no : data.addressEntrance ?: '',
floor : data.addressFloor ?: '',
apartment : data.addressApartment ?: '',
description : data.addressDescription ?: ''
],
contacts : [[
name : data.contactName ?: '',
value : data.phone ?: '',
name : data.contactName ?: '',
value : data.phone ?: '',
type : 'phone'
]]
]
Expand All @@ -203,10 +203,11 @@ class PlanadoV2 {
}

LinkedHashMap payload = [
template_id : toIntSafe(data.templateId),
client_id : data.clientId,
scheduled_at : data.startDate,
description : data.description ?: ''
template_id : toIntSafe(data.templateId),
client_id : data.clientId,
scheduled_at : data.startDate,
description : data.description ?: '',
custom_fields : data.customFields ?: []
]

logger.info('Creating new job')
Expand All @@ -221,6 +222,9 @@ class PlanadoV2 {
if (data.containsKey('description')) {
description = data.description
}
if (data.containsKey('customFields')) {
custom_fields = data.customFields
}

it
}
Expand Down

0 comments on commit 750c9f1

Please sign in to comment.