Existing time entries are now loaded per member and month (backed by the
member_id/start index) and streamed with a cursor, so only the members an
import touches are loaded. The type is part of the fingerprint, so a break is
no longer matched against a work entry.
Re-importing the same data duplicated all time entries, because only
clients, projects, tasks, tags and users were matched with existing
records. Time entries are now matched by member, start, end, project,
task and description. Matches are counted, so identical time entries
within one import are still kept.
Fixes#894
The laravel-pint-action builds on composer:latest, whose current image lacks
mbstring and crashes pint. Run vendor/bin/pint after setting up PHP instead,
which also uses the pint version from composer.lock. Remove an unused import
that the newer pint version reports.
Invalid UTF-8 (for example CSV files saved as Windows-1252 by Excel) was only
rejected by the database on insert, which failed the import with a generic
unexpected error. The CSV importers and the CSV files in solidtime exports are
now checked up front and fail with a clear message.
- Mark stale imports/exports of the organization as failed when a new one is created, so they do not block until the prune command runs
- Move the stale check into a stale() scope on the Import and Export models
- Remove orderBy(created_at) from chunkById queries in the prune commands, it skipped rows with random UUIDs
- Delete the export file if the export was deleted while it was running
- Extract the error details formatting into ErrorDetailsFormatter
- Add the exports() relation to Organization
The importers keep the original exception as the previous exception, so the
exception chain and stack trace can be stored in the new error_details column.
The details are only visible in the admin panel, which now also links the
organization and user of an import.
The job's failed() handler can not mark a timed out import as failed, since
the timeout handler runs while the import transaction is still open and the
change is rolled back when the worker is killed. It also must not mark the
import as failed when the queue hands out the job a second time after
retry_after, while the first attempt is still running.
Running imports are now considered stale shortly after the job timeout and
the prune command runs every five minutes.
* publish npm packages automatically when their version changes
* run the publish job in a main-only npm environment
* drop release tags so the publish job only needs read access
* split the package check and publish into separate workflows
* add @solidtime/composables package shared by web, desktop and extension
* bump api to 0.0.8 and require it in composables
* drop the manual composables publish workflow
* Normalize email case in admin commands, Filament user form, imports and placeholder merging
* Add tests for email case normalization
* Lowercase existing invitation emails and match duplicates case-insensitively
Adds a migration that lowercases organization_invitations.email. Invitations of the
same organization whose emails only differ in case are deduplicated first (accepted
invitation preferred, otherwise the newest), so the unique index is not violated.
The duplicate check when inviting a user now ignores case.
* Lowercase placeholder emails in migration and use Str::lower for emails
Adds the invoice logo fields to the API client and a permission helper for
the invoice settings page. Points the Invoicing extension at the
feature/invoice-logo branch, which must be pinned to a release tag before
merging.
Creating, editing, deleting and bulk deleting time entries in the Filament
admin panel did not dispatch the spent time recalculation jobs, leaving
stale spent_time values on projects and tasks.
Fixes#1319