{"action":"created","issue":{"url":"https://api.github.com/repos/mautic/mautic/issues/6764","repository_url":"https://api.github.com/repos/mautic/mautic","labels_url":"https://api.github.com/repos/mautic/mautic/issues/6764/labels{/name}","comments_url":"https://api.github.com/repos/mautic/mautic/issues/6764/comments","events_url":"https://api.github.com/repos/mautic/mautic/issues/6764/events","html_url":"https://github.com/mautic/mautic/issues/6764","id":372331178,"node_id":"MDU6SXNzdWUzNzIzMzExNzg=","number":6764,"title":"Impossible to overwrite boolean values through POST request.","user":{"login":"yrammos","id":1519337,"node_id":"MDQ6VXNlcjE1MTkzMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1519337?v=4","gravatar_id":"","url":"https://api.github.com/users/yrammos","html_url":"https://github.com/yrammos","followers_url":"https://api.github.com/users/yrammos/followers","following_url":"https://api.github.com/users/yrammos/following{/other_user}","gists_url":"https://api.github.com/users/yrammos/gists{/gist_id}","starred_url":"https://api.github.com/users/yrammos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yrammos/subscriptions","organizations_url":"https://api.github.com/users/yrammos/orgs","repos_url":"https://api.github.com/users/yrammos/repos","events_url":"https://api.github.com/users/yrammos/events{/privacy}","received_events_url":"https://api.github.com/users/yrammos/received_events","type":"User","site_admin":false},"labels":[{"id":154414515,"node_id":"MDU6TGFiZWwxNTQ0MTQ1MTU=","url":"https://api.github.com/repos/mautic/mautic/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":198196353,"node_id":"MDU6TGFiZWwxOTgxOTYzNTM=","url":"https://api.github.com/repos/mautic/mautic/labels/Pending%20Feedback","name":"Pending Feedback","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-21T16:18:01Z","updated_at":"2018-10-25T08:15:28Z","closed_at":null,"author_association":"NONE","body":"[//]: # ( Invisible comment: \r\nIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII\r\nBefore you create the issue:\r\nIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII\r\nSearch for similar report among other reported issues.\r\nLearn how to troubleshoot at https://www.mautic.org/docs/en/tips/troubleshooting.html\r\nUse drag&drop to attach images or other files )\r\n\r\n## Bug Description\r\n\r\nI am following the excellent gist by @escopecz at https://gist.github.com/escopecz/136f62b66d526bc32006f0d2358a8e15 to upload form data via POST request.\r\n\r\nAmong the key-value pairs that I am uploading in a single request are a few boolean fields. Curiously, it seems impossible to turn boolean fields off to 'false' (or '0' or 'no') if they are already set to 'true' (or '1' or 'yes').\r\n\r\nAs a result I now have to use an ordinary text field for those values, which is semantically not elegant at all.\r\n\r\nThis might be related to #6087.\r\n\r\n| Q   | A\r\n| --- | ---\r\n| Mautic version | 2.14.2-beta\r\n| PHP version | 7.0.32\r\n| Browser | Any\r\n\r\n### Steps to reproduce\r\n1. Create a form with one or more boolean fields in Mautic.\r\n2. Set at least one of these boolean fields to true for a contact.\r\n3. Place a POST request to set the boolean field(s) of step 2 back to false for the said contact. Result: the operation fails and the field stays true.\r\n \r\n### Log errors\r\n\r\nNone.\r\n\r\n[//]: # ( Invisible comment:\r\nPlease check for related errors in the latest log file in [mautic root]/app/log/ and/or the web server's logs and post them here. Be sure to remove sensitive information if applicable. )"},"comment":{"url":"https://api.github.com/repos/mautic/mautic/issues/comments/432957035","html_url":"https://github.com/mautic/mautic/issues/6764#issuecomment-432957035","issue_url":"https://api.github.com/repos/mautic/mautic/issues/6764","id":432957035,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjk1NzAzNQ==","user":{"login":"escopecz","id":1235442,"node_id":"MDQ6VXNlcjEyMzU0NDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1235442?v=4","gravatar_id":"","url":"https://api.github.com/users/escopecz","html_url":"https://github.com/escopecz","followers_url":"https://api.github.com/users/escopecz/followers","following_url":"https://api.github.com/users/escopecz/following{/other_user}","gists_url":"https://api.github.com/users/escopecz/gists{/gist_id}","starred_url":"https://api.github.com/users/escopecz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escopecz/subscriptions","organizations_url":"https://api.github.com/users/escopecz/orgs","repos_url":"https://api.github.com/users/escopecz/repos","events_url":"https://api.github.com/users/escopecz/events{/privacy}","received_events_url":"https://api.github.com/users/escopecz/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T08:15:28Z","updated_at":"2018-10-25T08:15:28Z","author_association":"CONTRIBUTOR","body":"I re-tested and had to add 2 new hidden fields. See my comment bellow the gist:\r\n\r\nhttps://gist.github.com/escopecz/136f62b66d526bc32006f0d2358a8e15#gistcomment-2742206\r\n\r\nLet me know if it helped."}}
{"actor":{"display_login":"escopecz"}}