Migration from Horilla
The package web- imports the data of a Horilla installation once: companies,
organisation, employees, working time and calendar, punches, leave and opening balances. HR signs off a
reconciliation before the cut-over. Install the package for the import and remove it afterwards. All steps are
console commands on the server.
Before you start
-
Install the package:
composer require web-vision/adsum-migration bin/console doctrine:migrations:migrateCopied! - Create the adsum companies the Horilla companies go into; the import does not create companies.
- Create the sickness leave type of every company if Horilla's sickness is to become sickness reports.
-
Create a read-only PostgreSQL role for Horilla:
CREATE ROLE adsum_import LOGIN PASSWORD '...'; GRANT CONNECT ON DATABASE horilla TO adsum_import; GRANT USAGE ON SCHEMA public TO adsum_import; GRANT SELECT ON ALL TABLES IN SCHEMA public TO adsum_import;Copied!The import does not run while the role may change a table it reads.
- Export the applied Horilla migrations of the reviewed copy into
horilla-in the mapping directory, onemigrations. txt app.per line. The import refuses any other Horilla schema.name
Configuration
-
- Type
- string
The connection to Horilla with the read-only role, for example
postgresql://. Set it inadsum_ import:...@horilla- db: 5432/ horilla?server Version=16 .env..local
-
- Type
- time zone identifier
The time zone of Horilla's times, for example
Europe/. No default.Berlin
-
- Type
- date (
YYYY-)MM- DD
The day adsum becomes the system of record. Opening balances are booked on this day.
-
- Type
- date (
YYYY-)MM- DD - Default
- 1 January of the cut-over year
Punches and leave requests before this day are not imported.
-
- Type
- date (
YYYY-)MM- DD - Default
MIGRATION_HISTORY_ FROM
The day the working-time history starts: working-time assignments begin on the later of this day and the entry date, so the working-time account is what adsum computes from the imported punches from here on. It must lie between
MIGRATION_and the cut-over date. Set it to the first day with punches, otherwise the months before count as days without work.HISTORY_ FROM
-
- Type
- path
The directory of the mapping files described below.
-
- Type
- path
The directory of the import reports and reconciliation files, readable by their owner only. The reconciliation files contain names.
-
- Type
- path
Optional: a read-only copy of Horilla's
MEDIA_, for uploaded files such as the profile photos of the employees, the certificates of sick leave and the photos of asset allocations. Without it, the profile photos are reported as missing (ROOT profile) and the other files as not copied (Photo Missing photos).Not Copied
-
- Type
- integer
- Default
90
How long
prune-keeps the files.reports
Mapping files
The mapping files hold HR's decisions. The import checks them first and names every invalid entry. A YAML file that has
content but not its top-level key (companies:, groups:, leave, calendars:, organisation:) is
refused with mapping, because it would otherwise import nothing without saying so.
companies.yaml - Per Horilla company id:
target(the adsum company id),timeandZone federal(for exampleState DE-), the region of the company and its locations. The regions and holidays need the country package (BY web-for Germany); without it, the company is imported without region and reported withvision/ adsum- country- de region, andNot Installed statutory-skips it. Companies not listed are skipped. The optionalholidays defaultis the name of a location thatLocation locationscreates in the company; every employee without a location in Horilla gets it, with the warninglocation. The optionalDefaulted daysets the day validation of the company on every import, as the settings page has it:Validation policy(off,allorconditional) and, optionally,worked,Above Seconds delta,Above Seconds delta(seconds) andBelow Seconds with; for example `Violations day` for a check of every day more than 1:30 over or short of its target. Days before the cut-over never wait for a manager; they count as validated, as in Horilla. The optionalValidation: { policy: conditional, delta Above Seconds: 5400, delta Below Seconds: 5400 } planningsets who reads the planning of the company, where the Planning package is installed:planning:lets every employee read the planning of every person and team,{ visibility: company } team(the default) only their own teams. Without the Planning package the setting is reported (planning). The optionalNot Installed featuresswitch features of the installed packages on or off on every import:features:for a company that uses neither work types nor schedule change requests. A feature no installed package declares is an error of the row ({ work Types: off, schedule Changes: off } feature). The optionalUnknown colleague(Absence Visibility off,team,departmentorcompany) sets on every import whose absences colleagues see; without it the company keeps its setting (a new company starts withdepartment). Which absence types colleagues see, the import never sets. The optionalgravatar(Enabled trueorfalse) sets on every import whether employees without a photo are shown with their Gravatar; without it the company keeps its setting (a new company starts withfalse). roles.yaml -
groups: the adsum role (hr,admin) of each Horilla group;superusers: Horilla user names that become admins; the optionalpeople: the roles of single people by personnel number, for those whom no group describes. The roles areemployee,hrandadmin; they are added to those of the groups and never remove one. An example:people: H7: [hr] PEP#32: [hr]Copied!A personnel number is the badge id of the employee, or the one
personnel-gives it. An unknown role stops the import like any broken mapping entry and names the entry (numbers. csv people.). The stageH7 person-lists every granted role withroles roleand writes nothing, since the roles are granted when the account is created throughGranted invite-or the normal invitation; a personnel number that belongs to no employee (users unknown) or to several (Personnel Number ambiguous) is an error of the row and grants nothing. A second run changes nothing.Personnel Number leave-types. yaml - Per Horilla leave type id an
action:create,existing(withkey, the adsum leave type id),sickness,timeorOff In Lieu skip(withreason). Several Horilla types may map to one adsum type; their balances are added up. Withbalancethe balances of a type open as carry-over, valid until their own expiry in Horilla or elseAs: carry Forward valid(Until YYYY-), which is meant for the vacation types of earlier years. Create the adsum type and its policies, valid from the cut-over date, beforeMM- DD leave-. A type without entry is created only if it is a plain yearly type in days.balances personnel-numbers. csv employeefor employees without a usable badge id.Id,personnel Number entry-dates. csv employee(Id,entry Date YYYY-): the real entry date of an employee. Without an entry the import takes Horilla's joining date, and without that the earlier of the creation of the employee's login and the first attendance day, with the warningMM- DD entryso that HR can correct it after the go-live.Date Derived weekly-contract. csv personnel; overrides the weekly full time of the shift.Number,weekly Contract Seconds exit-dates. csv personnel(Number,exit Date YYYY-): the real exit date of an employee who is inactive in Horilla. Without an entry the import exits the person on the contract end of Horilla, else on the day of the last attendance. A row wins over both, and the employment of the person ends that day. A date that is no date, or a personnel number listed twice, stops the import like any broken mapping entry. The stageMM- DD exit-reports a personnel number that no employee of Horilla has (dates unknown); a row for an employee who is active in Horilla changes nothing.Personnel Number working-time- history. csv employee(datesId,valid From,valid To,model YYYY-,MM- DD validempty for an open end): the working-time periods of an employee, because Horilla knows only the current shift.To modelis a Horilla shift id (numeric) or the code of a working-time model that exists in the company before the import, for example a model without working days for a leave of absence. The rows of a listed employee replace the single assignment the import derives from the shift; gaps between rows stay without model. A period that begins before the entry date orMIGRATION_is cut there (WORKING_ TIME_ FROM working). Overlapping rows (Time History Cut working) or an unknown model (Time History Overlap working) are errors and the employee gets no assignment. Employees that are not listed keep the derived assignment.Time History Model Unknown employment-history. csv personnel(dateNumber,from,employment Type,weekly Contract Hours YYYY-, the type by its German name in the company, the hours as a decimal number, for exampleMM- DD 32or39.): the employment periods of a person, because Horilla knows only the current work information. List the periods in order, one row each; a period lasts until the day before the next one and the last one stays open. The first row is the entry date. The rows of a listed person replace the single period the import derives from the work information and5 weekly-; department, job position, job role and location are those of the current work information. A type that is unknown in the company (contract. csv employment), a row dated before the one above (History Type Unknown employment) or on the same day (History Unordered employment) and a first row that is not the entry date (History Overlap employment) are errors, whose field names the line, and the person is not imported. The stageHistory Start employment-reports a personnel number that no employee of Horilla has (history unknown). A second run with the same file changes nothing; a period added to the file is added, but a period that starts on the day of an existing one with other data is reported (Personnel Number employment): correct it on the employee record. For a person who changes later in the running system, use the correction of the employment period there instead of the file.History Period Exists additional-absences. csv personnel(datesNumber,from,to,part,leave Type,reason YYYY-,MM- DD tomay stay empty for a single day,partisfull,firstorHalf secondand may stay empty forHalf full; a half day is a single day, the leave type is its German name in the company orsickness): absences that were missing in Horilla, such as a vacation approved outside the system, a release by law or a sickness nobody reported. Every fresh import starts from Horilla's data again, so list them here once instead of entering them by hand after each run. The stageadditional-, afterabsences leave-andrequests punches, enters each row the way HR records an absence afterwards: a leave request that is approved at once without an approval step, marked as entered by HR, with the reason in its history, or a sickness report forsickness. A day before the cut-over is charged against the opening balance, carried-over leave first; the balance must cover it. A row with a bad date, an unknown part, no reason or the same entry twice stops the import like any broken mapping entry. A personnel number nobody has (unknown), a leave type the company does not have (Personnel Number leave) and a request the leave rules refuse, such as a day that is not in the past (Type Unknown request), are errors of that row. A row that shares a day, or a half of it, with a request or a sickness (Refused overlapping) or with tracked time (Absence overlapping) is reported and not imported. Every row that was entered is listed in the report (Tracked Time additional). A second run changes nothing, also when only the reason in the file changed.Absence Recorded attendance-adjustments. csv personnel(datesNumber,date,action,new Date,reason YYYY-; put a reason with commas in quotes): decisions of HR about attendance records that Horilla holds on the wrong day, such as a correction entered with the date of the day before the work. The only action isMM- DD move: the record of the person onTo date, and its punches if it has any, is imported as if it belonged tonew, at the same times of day, and the reason becomes the note of the day. The leave of the person stays as it is, so the work counts on top of a vacation day. This holds forDate punches,attendance-andcorrections attendance-alike. The stagewithout- punches attendance-reports every row and writes nothing: a row that is applied is listed withadjustments attendance; a row for which Horilla holds no record of the person onMoved date(attendance) or whoseAdjustment No Record newalready has tracked time in Horilla (Date attendance) is an error of the row and not applied, and so is a personnel number nobody has (Adjustment Target Busy unknown) or several have (Personnel Number ambiguous). A row with an action nobody knows, a bad date, the same day twice, no reason or the same record twice stops the import like any broken mapping entry. Every fresh import starts from Horilla's data again, so list the records here once. A second run changes nothing.Personnel Number organisation.yaml -
Optional. The company structure HR decided, which wins over Horilla's departments and reporting lines from the cut-over date on; what Horilla held before stays as it was, as the employment periods and reporting lines of the people carry it. Under the top-level key
organisation(a misspelled key is refused) and with personnel numbers as the import gives them (badge ids, orpersonnel-):numbers. csv organisation: validFrom: 2027-03-15 departments: X-Men: { lead: H18, substitute: H4, members: [H4, H35, PEP#22] } Justice League: { lead: H8, members: [H15, H12] } withoutDepartment: H23: { manager: H2 } leadsReportTo: H2 dropDepartments: [Design] planningTeams: FES Community Portal: { H23: 100, H10: 100 } X-Men: { H15: 50 }Copied!validis optional: the day the file applies from, at most the cut-over date (a later day, or a value that is no date, stops the import withFrom mapping). It lets you check the new structure in a rehearsal before the cut-over; what Horilla held before that day stays, and the cut-over date for openings and leave does not change. Leave it out for the real cut-over: then the file applies from the cut-over date. The day is reported once (Invalid organisation). Where this text says cut-over date for the structure, it means this day when it is given. If you change it, the next run applies the structure from the new day.Valid From departmentslists each department with itslead(who becomes its head and belongs to it), an optionalsubstituteand itsmembers. A member reports to the lead of the department, a lead toleads(a lead who is that person keeps the manager Horilla has), and the department and manager of everybody apply from the cut-over date, or from the entry date of somebody who enters later. A department the company lacks is created. The substitute is a permanent substitute of the lead, without end date, for the approvals of the lead.Report To withoutgives people without department a manager; the model needs a department for everybody, so they keep the one they have (Department without). A department ofDepartment Kept drop, and one whose name Horilla spells differently from the file (Departments Justice LeageforJustice League, reported withdepartment), is archived, not deleted, once nobody works in it any more; while somebody does, the row is an error (Misspelled department). Somebody who left before the cut-over does not count; the employment of everybody who left in Horilla ends on the day they left.Not Empty planninglists the share in percent of each member per team, where the Planning package is installed; a team named like a department of the file also holds its lead and members with 100 %, unless the team gives them another share. The team is created in the company of its members, with its members from the cut-over date. Without the Planning package every team is reported (Teams planning) and nothing is written.Not Installed The stage
organisationruns afterreporting-, and beforelines leave-, so that the requests still waiting are submitted to the managers of the file. It reports a person nobody has (requests unknown) or several have (Personnel Number ambiguous), a person who would sit in two departments or in a department and in none (Personnel Number person), a person who leads two departments and is a member of neither (In Two Departments lead: add the person to the members of one of them), one who has left before the cut-over (Of Two Departments Without Membership not), a manager who is not imported (Employed At Cutover manager) or of another company (Not Imported manager), and a team member of another company than the team (Of Other Company team), each as an error of its row. Every change against Horilla is listed with the infoMember Of Other Company department,Created department,Lead Changed departmentandChanged manager(the field names old and new),Changed substitute,Set departmentandArchived planning. If the employment of a person already has a period that starts on the cut-over date, which cannot be changed, the change starts on the next day (Share Set change). A later change of Horilla does not take back what the file decided for a person. Every fresh import starts from Horilla again, so keep the file. A second run changes nothing, and a dry run writes nothing.Starts After Cutover leave-balances- confirmed. csv personnel: leave balances confirmed by HR; they replace Horilla's.Number,leave Type Id,days,seconds leave-requests- not- taken. csv request: the Horilla ids of undecided leave requests from before the cut-over that HR knows were not taken (see the leave requests below); they are imported as withdrawn and charge nothing.Id working-time- opening. csv personnel: the working-time account of every active employee at the cut-over date. Leave the file empty whenNumber,seconds MIGRATION_is before the cut-over date, because the account then comes from the imported punches; a value is refused withWORKING_ TIME_ FROM history.Already Counted apprenticeship-settings. yaml - Optional, where the Apprenticeship package is installed. Per Horilla company id
school(Day Counts As Whole Day trueorfalse): whether a school day of an apprentice counts as a full working day, set on the company thatcompanies.maps it to before the punches, so that the first calculation of an imported day knows it. A company that is not mapped is skipped (yaml company); without the file the stage says so with an info line (Not Mapped no).Apprenticeship Settings File
Cut-over
-
Check the source:
bin/console app:migration:horilla:preflightCopied! -
Rehearse with a dry run; it writes only its reports:
bin/console app:migration:horilla:run-all --dry-runCopied!Every stage reports counts and one line per issue (source id, field, reason). Correct Horilla or the mapping files and repeat. A row the target refuses is reported as
target; its field names the reason, the short name of the exception class or, for a failed validation, the property path and the message key. The exception is in the log as a warning.Refused The dry run reports what the real run does: a company listed in
companies.stands for the adsum company named by itsyaml target, and a leave type with the actionexistingorsicknessfor the adsum type it names, also for the stages after them. - The import handles the messages it causes (recalculated attendance days, account bookings, violations, lateness,
leave effects) itself, inside the run, and puts none of them on a queue. The workers can keep running. When the
database ends a batch in a deadlock with another process, the import tries it again; if the batch still fails, the
stage ends as failed with the issue
targetand the database error, and a repeated run continues after the last committed batch. At the end of a run, and ofLocked delta, the closed weeks are evaluated for the rules over a period, such as the average working time; the first evaluation of a person announces nothing, and what a later one finds notifies nobody.app:starts the same evaluation by hand.attendance: evaluate- periods -
After every update of the code, clear the cache of the environment you import in; a kernel that is not in debug mode does not notice changed code and keeps running on the old container, which ends in errors such as a constructor with too few arguments:
bin/console --no-debug cache:clearCopied! -
Import, with
APP_orENV=prod --. A kernel in debug mode remembers every query, which slows a long import down and makes the process grow by gigabytes; the commands warn when they find debug mode:no- debug bin/console --no-debug app:migration:horilla:run-allCopied!The run stops after a stage with errors unless
--is given. Run a single stage withcontinue app:. Repeating a run continues where it stopped and imports nothing twice.migration: horilla: import <stage> The stage
profile-runs afterphotos employeesand sets the profile photo of Horilla (employee_, read from MIGRATION_MEDIA_DIR) as the photo of the employee, with the checks of an upload: a JPEG (alsoprofile .jfif), PNG or WebP image of at most 5 MB and 4096 pixels per side. A missing file (profile) or one the checks refuse (Photo Missing profile) is a warning; the employee keeps the photo they have. A photo that changed in Horilla replaces the imported one on the next run or the delta import. A photo takes precedence over Gravatar.Photo Refused Horilla keeps a job role below its job position, so two roles of different positions may share a name; adsum keeps names unique per company. A role whose name (trimmed, upper and lower case alike) an adsum role of the company already has is mapped onto that role and reported with the warning
job; the employees who use it get that role.Role Merged Horilla stores fractions of a second, adsum records one punch of an action per second and employee. Of two clock-ins of an employee within the same second, and likewise of two clock-outs, only the first is imported (by the fraction of a second, then by the lower activity id); the later one is skipped and reported with the warning
duplicate, whose field names the activity of the first. A clock-in and a clock-out in the same second are different actions and both stay. If the activities of such a double click have clock-outs, the first clock-in pairs with the earliest of them and the other clock-outs are skipped with the same warning, whose field names the activity whose clock-out was kept. An activity of the double click without clock-out takes part like the others, also when later activities follow it.Punch Merged An activity whose clock-out lies before its clock-in is handled like an activity without clock-out, but reported with the warning
out; it needs no acceptance.Not After In An activity that lasts longer than 16 hours, or whose clock-out lies after the next clock-in of the person, is a clock-out Horilla closed much later. It is imported with the clock-out set so that the day ends at its planned working time: the clock-in plus the working time planned for that day less what the earlier activities of that day add up to (as they are imported), at least the clock-in itself when the day has reached its time (on a day without planned time the end of the day), at most one second before the next clock-in, and reported with the warning
clock, whose field is the clock-out of Horilla. The cut never crosses midnight: it is at most the last second of the clock-in's day in the time zone of the person. A day without planned time (a weekly day off, a holiday) gets no invented time: the clock-out is the last second of that day and the activity is reported with the warningOut Cut clockinstead, for HR to correct. Activities that overlap are cut the same way and are no longer refused. The punches after such an activity are imported as usual. An activity whose clock-out lies on a later day than its clock-in and at most ten minutes before the next clock-in of the person is a clock-out that Horilla closed when the person clocked in again. It is cut like the others, whatever its length, and gets the reasonOut Cut No Target closedin the notice, on the attendance day and in the list of the cut days; on a day without planned time the reason staysBy Next Clock In no. An activity within one day, or with a real gap before the next clock-in such as a night shift, is imported as it is. On a day an absence reduces, the planned time is the target that is left after the absence: a day of vacation or sickness is cut at the clock-in, a half day at the clock-in plus half the target less the earlier work. For that the stageTarget End Of Day punchesruns afterleave-. Only a day whose scheduled target is zero keeps the end of the day. An activity belongs to the day it starts on, so activities that are each plausible can add up to more than a day: the clock-out of the activity that would take the day above 24 hours is cut where the day reaches 24 hours (requests clock). The activity that takes a day above 16 hours gets the warningOut Cut long, whose field is the date, for HR to check the day. The import records what follows from the imported days (violations of the working time rules, lateness, missing punches, balances below zero), but none of it sends a notification or an e-mail. The notifications of the cut days below are the only ones. The cut-over date is also the history boundary of the company: whatever path a later recalculation takes, nobody is notified about a day before it, while the facts stay recorded. Each person with a cut day gets one in-app notification per day, naming the day and the time the clock-out was set to, so that they can check it and correct it after the go-live. Unlike the records of the import, these notifications are sent; they are the only messages of an import that wait on the queue for the workers.Day An approved leave request for which adsum counts no days, because it lies on days off, on holidays or before the working-time model starts, or because the model has no day schedule, is imported all the same: it keeps its Horilla dates and status, takes nothing from the leave account and is reported with the warning
zero. A request that is only requested and counts no days stays refused (Quantity Imported request). The fileRefused weekly-sets the weekly contract time only, never the days of the week; a shift of Horilla without day schedule therefore gives no working days.contract. csv A request that was never decided in Horilla and ends before the cut-over counts as taken, because nobody decides it any more and the person was away. It is imported as approved by the import (the request shows that it was taken over undecided) and charged against the carry-over first, then against the rest of the balance, whichever Horilla leave type it was filed under. What the balance does not cover is booked all the same, so the balance goes below zero, and the request is reported with the warning
undecidedfor HR to resolve; nothing is raised automatically. Every other such request is reported asOverdrawn undecided. A request still undecided after the cut-over stays pending. HR checks the list of these requests (see the go-live check) before the final import and enters each request that was not taken intoTaken Over leave-; it is then imported as withdrawn (requests- not- taken. csv undecided) and charges nothing.Not Taken Horilla lets people book the free half of a half-day holiday, usually the afternoon of 24 and 31 December. adsum would count such a half day as nothing and leave the working half absent. The import therefore moves a half-day request of a single day that lies on the free half of a half-day holiday of the person to the working half, when the person tracked no time in Horilla on that day (no activity, no attendance record with worked time): it charges 0.5 days and completes the day, and the report lists it with the info
half. With tracked time the request stays as it is. Only the import does this; the request form of adsum is unchanged.Day Moved To Working Half Horilla applies an attendance request to its day record only, never to the activities, so the punches alone would lose every correction. The stage
attendance-imports them on top of the punches. An approved request becomes an approved correction of its day with origincorrections migration: the corrected clock-in and clock-out replace the first clock-in and the last clock-out of the day (see below), the replaced punches stay in the history, and a day without punches gets the pair. The approver of Horilla is named as the decider when that person was imported; otherwise nobody is named. Each one is reported with the warningcorrection, whose field is the Horilla attendance id. A request that is still waiting becomes an open correction that the approvers of adsum decide; it stays quiet until the migrated approvals are released (see below). It meets the punches of its day like an approved one, with the worked time that was requested, so that the approver sees that worked time in the preview and approving gives it. A request without any requested data is skipped asApplied no. A request without usable times is reported withRequested Data correction, also a waiting one without clock-out, since a correction needs both. An approved request whose clock-in and clock-out equal those of the day's activities to the minute is skipped asData Invalid correction, provided its worked time is missing or equals, within a minute, what the punches give; with another worked time it is a correction like any other, and the rules below for the worked time apply. A validated day record, or an approved request without requested data, whose clock-out equals to the minute the clock-out Horilla recorded for an activity the import cut that day only mirrors the forgotten clock-out: it is not imported, the informationMatches Punches recordnames it, and the cut stays in the list of the cut days for HR. A record with another clock-out is a correction as before. The reason of the correction is the description of the person, as written. That the correction was taken over is its originMirrors Cut Clock Out migration, which the approvals and the lists of corrections show as "Imported from Horilla" in the language of the reader. The delta import brings requests decided or made in Horilla later; an open correction that Horilla has decided meanwhile is withdrawn.An approved request changes only what it changed in Horilla: the first clock-in and the last clock-out of the day. The punches between stay, so the breaks of the day still count as breaks; a clock-in or clock-out that equals the corrected one to the minute is not replaced either. The day is listed with the information
correction. Where the corrected times do not fit the punches (a clock-in after the end of the first activity, overlapping activities), the corrected pair replaces all punches of the day, listed asKept Punches correction. If the worked time of the request (Replaced Punches attendance_) is lower by a minute or more than the day that results, for example because of a punch of one second, the difference becomes one break in the longest work interval and the day ends at the worked time of Horilla (informationworked_ hour correction, warningBreak Added correctionwhen the difference does not fit that interval). A worked time that is missing, zero or unreadable leaves the day as it is and is reported withBreak Not Placeable attendance. The approved worked time is the worked time of the day: where the punches that stay give less than it by more than a minute, for example because a punch is missing that the request repaired, the corrected clock-in and clock-out replace all punches of the day, with one break of the difference in the middle of the span (informationWorked Hours Missing correction). A worked time that is higher even than the corrected pair keeps the whole span of the pair and is reported withReplaced Punches attendance; the field of both isWorked Hours Exceed Span attendance_. An approved request without requested data on a day with an activity over midnight, which the import cut, is a correction as well, and so is a validated attendance record without requested data whose day has activities, whether it belongs to an update request or has a request flag, and whatever became of the request, since a validated record counts as confirmed: the clock-in, clock-out and worked time of its attendance record are the correction, under the same rules. A worked time above 24 hours, or above the span of the pair by more than the span, is not used: the day stays as it is, without a break, and is reported withworked_ hour attendance. If the attendance record of an approved request says another clock-in or clock-out, the record moved on after the approval, and its final values are the correction instead of the requested data (informationWorked Hours Implausible correction); a worked time that differs alone does not count. The next run replaces the days that an earlier import took over as one interval from the first clock-in to the last clock-out.Uses Final Record The import builds the days from the attendance activities only, but Horilla keeps a day a second time as an attendance record, and some records have no activity at all: HR entered or edited them by hand. The stage
attendance-imports such a record with worked time as the clock-in and clock-out of its day, as a correction with originwithout- punches migrationand a reason that names the previous system. A record that Horilla did not validate becomes an approved correction too; its reason says that the previous system did not confirm it. Each is listed with the informationattendance, whose field isWithout Punches attendance_. A clock-out that makes the day longer than 16 hours is cut like that of a punch (date clock). A record before the entry date of the person is reported withOut Cut attendanceand not imported, one without clock-in or clock-out withBefore Entry attendanceorTimes Missing out. A validated record whose day has activities with other times and that is not such a correction is not applied, but reported withNot After In attendance, whose field holds the times of the record and of the punches, so that HR decides. A record with a request, and a validated record of an update request, belongs toDiffers From Punches attendance-.corrections A person often entered such a day by hand with the break already taken off, so Horilla's worked time (
attendance_, also written without the leading zero asworked_ hour 9:) is lower than the span from clock-in to clock-out. The imported day gets Horilla's worked time: the difference becomes one break in the middle of the span, starting on a whole minute. A worked time that is missing or zero leaves the span as it is and is reported with45 attendance, one that is longer than the span withWorked Hours Missing attendance; the field of both isWorked Hours Exceed Span attendance_. Days that an earlier import took over as the whole span are corrected by the next run.worked_ hour An employee who is their own reporting manager in Horilla, as the top person usually is, is imported without a manager and reported with the warning
self; their requests then go to HR. Employees who report to each other, directly or over several steps, stay an error (Manager Dropped reporting) and are imported without manager.Cycle -
During the parallel run, import what changed in Horilla, as often as needed:
bin/console --no-debug app:migration:horilla:deltaCopied!The delta import handles its messages itself as well.
--compares every row. A punch that a correction replaced stays replaced: the delta does not create it again, and reports the row as skipped withfull- scan punch. When a run ends, the balances and the leave days on the attendance days are final; no worker has to catch up first.Voided By Correction -
Reconcile and let HR sign off:
bin/console app:migration:horilla:reconcile bin/console app:migration:horilla:signoff --by=hr@example.com --employee=<id> --note="..."Copied!Besides the rows per month, the report has a row
workedfor every day whose worked time differs from the worked hours Horilla validated for it (Day attendance_), classified like its month; a correction that did not come over shows up here with its day.worked_ hour --signs off every employee whose differences all have that classification. Accept an issue that cannot be fixed withonly- classification=<defect> app:. An accepted error no longer stops the stages that need the stage it came from, and the next run of that stage keeps the acceptance, with its note, for the same row, field and reason, shown asmigration: horilla: accept- issue <issue id> -- note="..." (accepted). If the row changed in Horilla in the meantime, or the reason or field differs, the issue is open again. -
After the last working day in Horilla, freeze the import (with a last delta):
bin/console app:migration:horilla:freeze --confirm bin/console app:migration:horilla:reconcileCopied! -
Check the cut-over; the command fails until every check passes:
bin/console app:migration:horilla:go-live-checkCopied!openis information and never fails: it lists the Horilla ids of the attendance requests that were imported as open corrections and that nobody has decided in adsum yet. They wait for the approvers of adsum, who can decide them after the go-live; until the invitations are sent a request whose approver has no account waits for HR as the fallback.Attendance Corrections undecidedis information too: one line per undecided request from before the cut-over that the import took over as taken, with the Horilla id, the personnel number, the period, the days and the wordLeave Requests overdrawnwhen the balance did not cover it. A request that counts no days, because it lies on days off, shows0 d, no working days in the period.unvalidatedis information too: one line per day that the import took from an attendance record without punches that Horilla had not validated, with the personnel number, the day, the times andAttendance nicht bestätigt im Altsystem / not confirmed in the previous system, so that HR can check these days. A record that Horilla validates later leaves the list.unbookedis information too: one line (personnel number and day) for each day of a half-day holiday, such as the afternoon of 24 and 31 December, on which an employed person booked nothing and tracked no time. These days stay as the import found them, with the working half of the day missing its hours, so that HR can check them.Half Holidays clockis information as well: it lists, per employee, the days on which the import cut a clock-out;Out Cut Days clocklists those of them on a day without planned time, which HR has to correct. A person without a user account is told of these days once the person gets one. The notice opens the attendance day, which shows the clock-out of Horilla next to the cut time.Out Cut No Target Days app:lists these days for HR with the clock-out of Horilla, the cut time, the reason and the kind: the days that may be real long days come first, then the clock-outs most likely forgotten (the original lies within an hour of the first clock-in or planned start of the next day with work, or more than two days after the clock-in), each with the path of its attendance day. The columnmigration: horilla: cut- clock- outs Correctionshowsopenfor a day with a request of Horilla that waits,invalidfor a day whose request of Horilla the import refused (correction;Data Invalid clocknames the refused request with the day, and HR decides what the real end was), andOut Cut Days replacedfor a day on which an approved correction took the place of the cut; these come last and are not listed inclock.Out Cut Days -
Go live: invite the employees and release pending requests to their approvers:
bin/console app:migration:horilla:invite-users --language=de bin/console app:migration:horilla:release-approvalsCopied!An active employee with an inactive Horilla user gets an account block (stage
account-, reason "Other", note "Imported from Horilla"), effective as soon as the invitation creates the account. HR lifts it in adsum. Archived employees get no block.blocks
Data of installed packages
Installed packages add their own stages to run-.
Assets
With web- installed:
asset-andcategories asset-batches - Go into their Horilla company, with the name as English and German text. With several companies: the first
(
in); with none: the only company, otherwise reported (Several Companies without). Categories have no custodians; HR gets their notifications until custodians are assigned.Company assets- Every asset becomes one unit; the tracking id becomes its serial number, and it gets a number of the company's
scheme.
Not-becomes "out of service". A batch of another company is dropped (Available batch). Expiry notices are sent only for dates after the import.Of Other Company asset-allocations - Every assignment becomes an allocation, without notifications. Returns keep their day, condition (as notes)
and status; a requested return stays requested. Of two open assignments of one unit, the older ends when the
newer began (
duplicate). Later returns in Horilla are taken over on the next run. Photos are copied from MIGRATION_MEDIA_DIR; a missing file (Open Allocation photo) or one that is not a JPEG, PNG or PDF of at most 10 MB (Missing photo) is reported and left out.Refused asset-requests - Waiting requests get their approvers from the current rules and reach them with
release-. Approved requests become fulfilled without an allocation; rejected ones stay rejected. Later decisions in Horilla are taken over on the next run.approvals asset-reports - Reports come with their date and documents, copied like the photos (
document,Missing document,Refused documents). They belong to no allocation; a report without title gets its date as title.Not Copied asset-fines - Horilla's payroll loans of type
finewith an asset, also without the payroll package. A fine is charged to the employee's allocation of the asset that began by the fine's day (allocationif none), regardless of the company's fine setting. Payroll is not notified.Not Found
Directory login
With web- installed:
identity-providers - Horilla's LDAP settings become a disabled
ldapsign-in provider "LDAP (Horilla)" in every imported company, with server, bind DN and base DN, but without the bind password. An admin enters the password, tests the connection and enables the provider. A plainldap://server is set to StartTLS. Later runs do not change the provider.
Switching the import off
-
After the retention period, delete the files:
bin/console app:migration:horilla:prune-reportsCopied!Runs, issues, reconciliation lines and sign-offs stay in the database.
- Remove
MIGRATION_fromHORILLA_ DSN .env.and drop the read-only role in Horilla.local -
Remove the package; its tables stay:
composer remove web-vision/adsum-migrationCopied!