Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCX-69 Fix saving JSON when update HOMS order #60

Merged
merged 1 commit into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ v1.4.5 [unreleased]
-------------------
### Bugfixes
- [#62](https://github.com/latera/camunda-ext/pull/62) Fix OTRS entity path
- [#60](https://github.com/latera/camunda-ext/pull/60) Fix saving JSON when update HOMS order

v1.4.4 [2020-04-17]
-------------------
Expand Down
5 changes: 4 additions & 1 deletion src/org/camunda/latera/bss/utils/Order.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import static org.camunda.latera.bss.utils.DateTimeUtil.iso
import static org.camunda.latera.bss.utils.StringUtil.forceNvl as nvlString
import static org.camunda.latera.bss.utils.ListUtil.forceNvl as nvlList
import static org.camunda.latera.bss.utils.ListUtil.parse as parseList
import static org.camunda.latera.bss.utils.ListUtil.isList
import static org.camunda.latera.bss.utils.MapUtil.parse as parseMap
import static org.camunda.latera.bss.utils.MapUtil.isMap
import org.camunda.latera.bss.connectors.Minio

class Order implements GroovyObject {
Expand Down Expand Up @@ -215,7 +217,8 @@ class Order implements GroovyObject {
value = value as String
} catch (Exception e) {}
}
if (name.endsWith('List') || name.endsWith('JSON') || name.endsWith('Map')) {
if ((name.endsWith('List') || name.endsWith('JSON') || name.endsWith('Map')) &&
(isList(value) || isMap(value))) {
try {
// servicesMap: [a:1, b:'2'] -> servicesMap: '{a:1, b:'2'}'
// serviceList: [1, 2, '3'] -> serviceList: "[1,2,'3']"
Expand Down