{"action":"created","issue":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3797","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3797/labels{/name}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3797/comments","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3797/events","html_url":"https://github.com/akeneo/pim-community-dev/issues/3797","id":123661516,"number":3797,"title":"Multiselect field type for item step getConfigurationFields()","user":{"login":"NovikovViktor","id":8058373,"avatar_url":"https://avatars.githubusercontent.com/u/8058373?v=3","gravatar_id":"","url":"https://api.github.com/users/NovikovViktor","html_url":"https://github.com/NovikovViktor","followers_url":"https://api.github.com/users/NovikovViktor/followers","following_url":"https://api.github.com/users/NovikovViktor/following{/other_user}","gists_url":"https://api.github.com/users/NovikovViktor/gists{/gist_id}","starred_url":"https://api.github.com/users/NovikovViktor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NovikovViktor/subscriptions","organizations_url":"https://api.github.com/users/NovikovViktor/orgs","repos_url":"https://api.github.com/users/NovikovViktor/repos","events_url":"https://api.github.com/users/NovikovViktor/events{/privacy}","received_events_url":"https://api.github.com/users/NovikovViktor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-23T13:37:14Z","updated_at":"2015-12-23T15:49:44Z","closed_at":null,"body":"Hello, I am working on creation one batch job. And I want to make some configuration parameter as multiselect option. So, I configured field like in the example below:\r\n\r\n```php\r\n public function getConfigurationFields()\r\n    {\r\n        return [\r\n            'deliveries' => [\r\n                'type'    => 'choice',\r\n                'options' => [\r\n                    'choices'      => ['test1', 'test2'],\r\n                    'required'     => true,\r\n                    'select2'      => true,\r\n                    'expanded'  => true,\r\n                    'multiple'     => true,\r\n                    'label'          => 'deliveries.label',\r\n                    'help'           => 'deliveries.help'\r\n                ]\r\n            ],\r\n        ];\r\n    }\r\n```\r\nI configured my job, and save it with both selected parameters. But when went to Job view page, I got exception:\r\n\r\n```\r\nAn exception has been thrown during the rendering of a template (\"Notice: Array to string conversion\") in PimImportExportBundle:JobProfile:_show_form.html.twig at line 13.\r\n```\r\n\r\nSo after some debugging process I found that you handle `choice` field type in your Twig filter `normalizeFieldValue` only when `data`  of `element.vars` is equal to string. But in that case it is equal to array. So I decided to override template with a bit of custom logic. But I don't know what items are selected, because `data` returns me an array that looks like:\r\n\r\n```twig\r\narray:2 [\r\n  1 =>1\r\n  0 =>0\r\n]\r\n```\r\nSo can somebody help me to find place where that array is preparing? Or give some advice how this should be handled? Thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments/166928660","html_url":"https://github.com/akeneo/pim-community-dev/issues/3797#issuecomment-166928660","issue_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3797","id":166928660,"user":{"login":"gplanchat","id":152367,"avatar_url":"https://avatars.githubusercontent.com/u/152367?v=3","gravatar_id":"","url":"https://api.github.com/users/gplanchat","html_url":"https://github.com/gplanchat","followers_url":"https://api.github.com/users/gplanchat/followers","following_url":"https://api.github.com/users/gplanchat/following{/other_user}","gists_url":"https://api.github.com/users/gplanchat/gists{/gist_id}","starred_url":"https://api.github.com/users/gplanchat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gplanchat/subscriptions","organizations_url":"https://api.github.com/users/gplanchat/orgs","repos_url":"https://api.github.com/users/gplanchat/repos","events_url":"https://api.github.com/users/gplanchat/events{/privacy}","received_events_url":"https://api.github.com/users/gplanchat/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T15:49:44Z","updated_at":"2015-12-23T15:49:44Z","body":"I don't understand your need, what do you mean by \"But I still need to add custom logic to output data, if it in array format.\"?"}}