diff --git a/CHANGELOG.md b/CHANGELOG.md index 899146963..57c658b34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,10 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - API: contracts can be read - one with its prepaid hours and where its signing stands - added, changed, made active, renewed, cancelled and deleted, sent for signature or sent the link again, and the request withdrawn. Prepaid hours can be added, with a draft invoice for them, and deleted, done tickets' time drawn on them and a ticket's hours put back, and the recurring invoice that bills a contract made, linked or unlinked. Countersigning and contract PDFs stay in ITFlow. - API: a client's files can be read, uploaded, downloaded, renamed, moved, archived, unarchived and deleted once archived, and its folders read, made, renamed, moved and deleted - what is in a deleted folder moves up. An upload comes base64 in the request, so the server's upload size caps it. - Contracts: an hourly or after-hours rate of 0 is now a rate of nothing - time it covers bills at no charge - where 0 used to be taken as empty, so the default rate applied. Leave a rate empty for the default, as before. A plan that covers business-hours time and bills after hours, say, is a contract with an hourly rate of 0 and an after-hours rate. Unbilled Time and its reports show such a contract's tickets at its rate, not as having no rate, and the client's terms show the after-hours rate even when it is 0. +- Imports: client and asset imports read a file by its headings, so the columns can be in any order and any can be left out - only the name is needed. A file exported from the clients or assets list imports as it is, a file separated by semicolons works too, and files made from the old templates still import. +- Imports: clients take everything their export has, and more - Lead, Tax Rate (one of your tax rates, by name), Tax Exempt with its certificate and expiry, Tags and Notes, besides what they took before. A phone number written with + and its country code, as the exports write it, keeps its country code. A client with no location or contact in the file no longer gets an empty one. +- Imports: assets take everything their export has, and more - Status, Primary IP (or DHCP), Primary MAC, Network, Link, Second Link and Client Link, Vendor, Order Reference, Install Date, Warranty Expire and Tags, besides what they took before. Assigned To, Location, Vendor and Network are the client's own, by name - Assigned To by email too. A row with no name is skipped instead of making a nameless asset. +- Imports: when one is done it says what couldn't be used - a date that isn't YYYY-MM-DD, a contact, vendor or tax rate it couldn't find, a heading it doesn't take. Long notes are no longer cut off. ### Bug Fixes @@ -94,6 +98,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - `php_flag engine off` in `uploads/.htaccess`, its `backups`, `expenses`, `tmp` and `canned_responses` folders and `scripts/.htaccess` is wrapped in ``. Apache only knows `php_flag` under mod_php - with PHP-FPM through `mod_proxy_fcgi` it stops on the line and answers every request in the folder with a 500. Under FPM, PHP still can't run there: `uploads/.htaccess` denies `.php`, `.phtml`, `.phar` and the rest by name, and the other five deny everything. - A contract's or contract template's rate of 0 is kept: `contractFromInput()` saves an entered 0 as `0.00` and only an empty field as `NULL`. `contractTicketRate()`, `contractTermsOn()`, `contractUsualTerms()`, `contractClientTerms()` and the clients list treat a rate as set when it isn't `NULL`, rather than above 0, and `contractClientTerms()` gives `null` for no after-hours rate rather than 0. The no-rate warnings on Unbilled Time, Unbilled Tickets, Time Detail by Client and the bill-a-ticket window are for a rate of 0 from the default only (`default_rate`). Contracts saved before kept no 0 rates - 0 was saved as `NULL` - so nothing changes for them. - `Virtual Machine` in `ASSET_TYPES` (`functions/asset_type.php`) has the `purchase` fields - Vendor, Order / invoice reference and Purchased. +- `functions/import.php` reads an import's CSV by its headings: `importColumns()` names the clients' and assets' columns (key, label - the template's and the export's heading - and other headings taken for it, with the assets' details from `ASSET_SPECS`), `importCsvRows()` checks the upload and gives each row by key, sniffing comma or semicolon and skipping a byte-order mark, with no line length limit. A file whose headings match none of them and has the old template's column count is read by position (`importLegacyColumns()`). `importTemplateDownload()` writes the template from the same list, and the import windows list it with `importHeadingsText()`. Helpers for the cells: `importYes()`, `importDate()`, `importList()`, `importPhone()` (a + number split into dial code and number, by `phoneFormatRules()`), `importTagIds()`, `importTaxId()` and `importClientRecordId()`. The template downloads now need read access to Clients or Support. ## [26.11.8] diff --git a/agent/modals/asset/asset_import.php b/agent/modals/asset/asset_import.php index a5f2752bd..ea488e678 100644 --- a/agent/modals/asset/asset_import.php +++ b/agent/modals/asset/asset_import.php @@ -17,15 +17,15 @@ ob_start();