Page MenuHomePhabricator

D19434.diff
No OneTemporary

D19434.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2882,6 +2882,7 @@
'PhabricatorDocumentRef' => 'applications/files/document/PhabricatorDocumentRef.php',
'PhabricatorDocumentRenderingEngine' => 'applications/files/document/render/PhabricatorDocumentRenderingEngine.php',
'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php',
+ 'PhabricatorDoubleExportField' => 'infrastructure/export/field/PhabricatorDoubleExportField.php',
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
'PhabricatorDraftDAO' => 'applications/draft/storage/PhabricatorDraftDAO.php',
'PhabricatorDraftEngine' => 'applications/transactions/draft/PhabricatorDraftEngine.php',
@@ -8540,6 +8541,7 @@
'PhabricatorDocumentRef' => 'Phobject',
'PhabricatorDocumentRenderingEngine' => 'Phobject',
'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication',
+ 'PhabricatorDoubleExportField' => 'PhabricatorExportField',
'PhabricatorDraft' => 'PhabricatorDraftDAO',
'PhabricatorDraftDAO' => 'PhabricatorLiskDAO',
'PhabricatorDraftEngine' => 'Phobject',
diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
@@ -516,7 +516,7 @@
);
if (ManiphestTaskPoints::getIsEnabled()) {
- $fields[] = id(new PhabricatorIntExportField())
+ $fields[] = id(new PhabricatorDoubleExportField())
->setKey('points')
->setLabel('Points');
}
diff --git a/src/infrastructure/export/field/PhabricatorDoubleExportField.php b/src/infrastructure/export/field/PhabricatorDoubleExportField.php
new file mode 100644
--- /dev/null
+++ b/src/infrastructure/export/field/PhabricatorDoubleExportField.php
@@ -0,0 +1,25 @@
+<?php
+
+final class PhabricatorDoubleExportField
+ extends PhabricatorExportField {
+
+ public function getNaturalValue($value) {
+ if ($value === null) {
+ return $value;
+ }
+
+ return (double)$value;
+ }
+
+ /**
+ * @phutil-external-symbol class PHPExcel_Cell_DataType
+ */
+ public function formatPHPExcelCell($cell, $style) {
+ $cell->setDataType(PHPExcel_Cell_DataType::TYPE_NUMERIC);
+ }
+
+ public function getCharacterWidth() {
+ return 8;
+ }
+
+}
diff --git a/src/infrastructure/export/format/PhabricatorExcelExportFormat.php b/src/infrastructure/export/format/PhabricatorExcelExportFormat.php
--- a/src/infrastructure/export/format/PhabricatorExcelExportFormat.php
+++ b/src/infrastructure/export/format/PhabricatorExcelExportFormat.php
@@ -155,8 +155,12 @@
return $this->sheet;
}
+
+ /**
+ * @phutil-external-symbol class PHPExcel_Cell
+ */
private function getCellName($col, $row = null) {
- $col_name = chr(ord('A') + $col);
+ $col_name = PHPExcel_Cell::stringFromColumnIndex($col);
if ($row === null) {
return $col_name;

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 5, 5:34 AM (10 h, 46 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7091686
Default Alt Text
D19434.diff (3 KB)

Event Timeline