{"action":"created","issue":{"url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/531","repository_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet","labels_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/531/labels{/name}","comments_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/531/comments","events_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/531/events","html_url":"https://github.com/PHPOffice/PhpSpreadsheet/issues/531","id":329437793,"node_id":"MDU6SXNzdWUzMjk0Mzc3OTM=","number":531,"title":"[BUG] Issue with conditional formatting being applied to the cell below the cell that matches the rule","user":{"login":"u01jmg3","id":1266205,"node_id":"MDQ6VXNlcjEyNjYyMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1266205?v=4","gravatar_id":"","url":"https://api.github.com/users/u01jmg3","html_url":"https://github.com/u01jmg3","followers_url":"https://api.github.com/users/u01jmg3/followers","following_url":"https://api.github.com/users/u01jmg3/following{/other_user}","gists_url":"https://api.github.com/users/u01jmg3/gists{/gist_id}","starred_url":"https://api.github.com/users/u01jmg3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u01jmg3/subscriptions","organizations_url":"https://api.github.com/users/u01jmg3/orgs","repos_url":"https://api.github.com/users/u01jmg3/repos","events_url":"https://api.github.com/users/u01jmg3/events{/privacy}","received_events_url":"https://api.github.com/users/u01jmg3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-05T12:39:52Z","updated_at":"2018-10-20T06:52:21Z","closed_at":null,"author_association":"NONE","body":"This is:\r\n\r\n```\r\n- [x] a bug report\r\n```\r\n\r\n### What is the expected behavior?\r\n\r\nConditionally formatting a range of cells as per the code below should format any cell beginning with the string '-'.\r\n\r\n\r\n### What is the current behavior?\r\n\r\n> _Conditionally formatting a range of cells as per the code below should format any cell beginning with the string '-'._\r\n\r\nThe formatting is applied but to the cell **below** the cell that begins with the string '-'.\r\n\r\n\r\n### What are the steps to reproduce?\r\n\r\nPlease provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) of code that exhibits the issue without relying on an external Excel file or a web server:\r\n\r\n```php\r\n<?php\r\n\r\nrequire __DIR__ . '/vendor/autoload.php';\r\n\r\n// Create new Spreadsheet object\r\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\r\n\r\n$worksheet = $spreadsheet->getActiveSheet();\r\n\r\n$conditional = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\r\n$conditional->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CONTAINSTEXT)\r\n            ->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_BEGINSWITH)\r\n            ->setText('-');\r\n$conditional->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_DARKRED);\r\n$conditional->getStyle()->getFill()->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)->getEndColor()->setARGB('FFC7CE');\r\n\r\n$worksheet->getStyle('A:Z')->setConditionalStyles([$conditional]);\r\n\r\n$data = [\r\n    0 =>  [\r\n        0 => 'Candidate Number',\r\n        1 => 'Candidate Name',\r\n        2 => 'Site',\r\n        3 => 'Run',\r\n        4 => '3. Diagnostic Procedure - ECG',\r\n        5 => 'Global Score',\r\n        6 => '7. Comms Resp History COPD',\r\n        7 => 'Global Score',\r\n        8 => 'Total',\r\n    ],\r\n    1 => [\r\n        0 => 1,\r\n        1 => 'Joe Bloggs',\r\n        2 => '-',\r\n        3 => '-',\r\n        4 => 24.5,\r\n        5 => 5,\r\n        6 => '-',\r\n        7 => '-',\r\n        8 => 24.5,\r\n    ],\r\n];\r\n\r\n$worksheet->fromArray($data);\r\n\r\nheader('Content-Type: application/vnd.ms-excel');\r\nheader(\"Content-Disposition: attachment; filename='test.xlsx'\");\r\n\r\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xlsx');\r\n$writer->save('php://output');\r\n```\r\n\r\n### Which versions of PhpSpreadsheet and PHP are affected?\r\n\r\n`v1.2.1`"},"comment":{"url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/comments/431555179","html_url":"https://github.com/PHPOffice/PhpSpreadsheet/issues/531#issuecomment-431555179","issue_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/531","id":431555179,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTU1NTE3OQ==","user":{"login":"ufhy","id":5884467,"node_id":"MDQ6VXNlcjU4ODQ0Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/5884467?v=4","gravatar_id":"","url":"https://api.github.com/users/ufhy","html_url":"https://github.com/ufhy","followers_url":"https://api.github.com/users/ufhy/followers","following_url":"https://api.github.com/users/ufhy/following{/other_user}","gists_url":"https://api.github.com/users/ufhy/gists{/gist_id}","starred_url":"https://api.github.com/users/ufhy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufhy/subscriptions","organizations_url":"https://api.github.com/users/ufhy/orgs","repos_url":"https://api.github.com/users/ufhy/repos","events_url":"https://api.github.com/users/ufhy/events{/privacy}","received_events_url":"https://api.github.com/users/ufhy/received_events","type":"User","site_admin":false},"created_at":"2018-10-20T06:52:21Z","updated_at":"2018-10-20T06:52:21Z","author_association":"NONE","body":"up"}}
{"actor":{"display_login":"ufhy"}}