50 employees, one department, one click. one click.
Assign every staff member to their attendance department — single, bulk or future-dated. Each assignment carries fromDate, toDate and an isPrimary flag, the system auto-ends the previous primary on transfer, and the full history stays visible for every employee.

How most Indian schools assign teachers to departments today
A new academic year starts on 1 April. The Vice-Principal sits down with the staff register on 28 March. He has 64 staff to slot — six new joiners, three teachers moving from Junior Wing to Middle, two admin staff transferring to the new branch, one PRT going on long maternity leave (and a substitute joining for nine months). He writes the department in pencil next to each name. By 31 March he has rewritten three pages because the Middle Wing teachers were tagged Senior by mistake — the head clerk had noticed in a different file.
By 5 April the head clerk has typed the assignments into the salary Excel sheet, mapping each name to a department code and copying the time settings into a separate column for late-coming. The PT teacher's transfer didn't make it because the column was already locked. The new joiner's first week shows up as absent on the attendance dashboard because no one had assigned her to a department yet. The accountant calls the Vice-Principal at 6 p.m. on 5 April: salary registers can't close.
Department assignments aren't a setup problem; they're a moving-target problem. Teachers shift between wings, support staff get rotated, new staff join mid-year, old staff retire, primary teachers go on maternity. Every move needs a fromDate, an optional toDate, an isPrimary flag — and the system has to remember what was true last year, on the day the punch happened. Inkwelly's department assignments are built for exactly that — one click for 50 staff, full history forever, and salary registers that close on the 1st.

How department assignments work
An assignment is the link between a staff member and an attendance department. It carries five fields: employeeId, departmentId, fromDate (mandatory, ISO date), toDate (optional — null means open-ended), and isPrimary (boolean — the primary department's rules govern daily attendance). When you create an assignment with autoEndPrevious: true (the default), the system finds the employee's existing primary assignment and sets its toDate to one day before the new fromDate — the transfer is atomic, with no overlap and no gap.
Single-employee assignments use a simple call: pick employee, pick department, pick date, hit Assign. Future-dated assignments are valid — assign a new joiner to Teaching on 1 April even on 28 March, and the system simply waits. Updating an existing assignment is one PATCH — typically to set a toDate when an employee leaves the department, or to change isPrimary if a secondary department becomes primary.
Bulk operations are built for academic year transitions. Select 50 employees on the Department Assignments page → click Assign → choose one department for all (or per-employee) → pick a single fromDate (e.g., 1 April for the new session) → optional toDate → confirm. The bulk endpoint accepts up to 100 assignments per call with continueOnError set to true, returning a summary of successful and failed rows so partial success is OK. Update sets toDate for everyone in one call. Remove force-deletes assignments that haven't accrued attendance, or sets toDate equal to yesterday for those that have — preserving history without leaking it forward.
Every assignment is auditable. Open any employee's profile → Department Timeline → see every department they've belonged to, with from/to dates, the primary badge and a chronological scroll. Salary, leave eligibility and short-leave caps for any historical month are computed against the department they were primary in on that day — even if they've been re-assigned three times since.
What every assignment carries
- Employee — the staff record being assigned, linked from Employee Information
- Department — the attendance department whose rules will govern this assignment's daily attendance
- From date (required) — ISO date, can be today, past or future; future assignments simply activate when the date arrives
- To date (optional) — null means open-ended; setting it ends the assignment cleanly without breaking history
- isPrimary flag — true means this department's time, week-off, short-leave and WFH rules apply for this employee
- Auto-end-previous toggle — when assigning a new primary, automatically end-date the existing primary at fromDate − 1
- Status — active or historical, derived from toDate; never edited directly, never out of sync
- Audit timestamps — assignedAt, createdAt and updatedAt for forensic clarity on every change
From listing to bulk-assign in three screens



Single-employee assignments — including future joiners
New joiner starting on 15 May? Open her employee profile → Department Assignments → New → pick Teaching → fromDate 15 May → Save. The assignment lives in the system from 28 March, but the attendance grader does nothing until 15 May arrives. On her first day the right rules apply automatically — no last-minute scramble, no head-clerk reminder, no register correction the next morning.


Bulk assign for the 1 April reset
The Vice-Principal of a 64-staff school spends three afternoons every April moving teachers between wings. Inkwelly turns it into one screen: select up to 100 staff via checkboxes, click Assign, pick a department (apply the same to all or override per row), set fromDate to 1 April, toggle auto-end-previous (so old primary assignments close on 31 March), confirm. The endpoint accepts continueOnError so partial failures don't roll back successful rows — review and retry the failed list, no SQL surgery.
Auto-end-previous keeps the history clean
A teacher transferring from Teaching to Admin on 15 March used to require two manual steps — close the old assignment on 14 March, open the new one on 15 March, hope no one mistypes either date. Inkwelly's auto-end-previous flag does both atomically when set to true (the default). The previous primary's toDate becomes 14 March, the new primary's fromDate is 15 March, no overlap, no gap, no late-coming graded against the wrong department for those 24 hours.


Every move, forever — the assignment timeline
Open any staff member's profile and the Department Timeline shows every department they've belonged to, in order, with from/to dates and a primary badge. April 2024 — Teaching (primary). October 2024 — Teaching (primary), Examinations (secondary, for board duty). March 2025 — Admin (primary). The timeline is the single source of truth for retroactive payroll questions, audit queries and statutory disclosures — and it's generated, not maintained.
“Pehle April month mein 3 din lagte the 60 teachers ko new wing mein assign karne mein. Ab one click — bulk select karo, Teaching department pick karo, 1st April fromDate, ho gaya. Auto-end-previous ne purani assignment khud band kar di.”
Where schools use department assignments today
1. The 1 April reset. A 60-staff school re-assigns 40 teachers to new wings on 1 April. Bulk-select 40 employees → Teaching (Senior Wing) → fromDate 1 April → autoEndPrevious — all old assignments close on 31 March, new ones live from 1 April. Total time: under 2 minutes.
2. The mid-year transfer. A PRT moves from Junior Wing to Middle Wing on 15 October. One-click new assignment with autoEndPrevious closes the Junior assignment on 14 October. Daily attendance from 15 October grades against Middle Wing's rules — including the different week-off pattern and grace period.
3. The maternity-leave substitute. A PRT goes on six-month maternity from 10 December. Her substitute joins on 12 December and gets a Teaching assignment with toDate set to 9 June 2026. On 10 June, her assignment auto-expires; the original PRT's assignment (which was paused, not deleted) reactivates seamlessly because her toDate was set to 9 December initially.
4. The exam-time secondary department. A senior PGT joins the EXAM-DUTY department for board exam season — primary stays Teaching, but a secondary assignment is added for the 30-day exam window. Approval routing for exam-related on-duty requests goes to the Examinations head; everything else still routes to the Teaching head.
5. The retiring head clerk. Head clerk retires on 31 March. Set toDate on his Admin assignment to 31 March. From 1 April his name disappears from active dashboards but every historical record is preserved for the audit and statutory disclosures.
Common operations on the Department Assignments page
- Search by employee name, employee ID or current department to find any record fast
- Filter by department to see exactly who is mapped to Teaching, Admin or any other group
- Sort by last name, employee ID, fromDate or createdAt — useful when reconciling end-of-year transfers
- Bulk-select up to 100 employees (validator cap) for one Assign, Update or Remove call
- Quick-apply or per-row department override inside the Bulk Assign dialog — same panel, two workflows
- Update toDate in bulk to retire a cohort cleanly without touching dates one by one
- Force-delete with safety — system rejects deletion of any assignment with attendance records and asks you to set toDate instead
- Pull every assignment for one employee — current and historical — for audit, transfer or termination paperwork
- Get the Employee Attendance dashboard summary by department: total employees, primary count and secondary count, live
See bulk assign run on a real Indian school
20-minute walkthrough — 50 employees, one department, one click. Plus the timeline view that the auditor wants when they call.
Limits, safety and small print
Bulk endpoint cap is 100 assignments per request. A 200-staff school splits into two calls. The endpoint validates each row independently and returns a per-row summary, so a single mistype in row 47 doesn't block rows 1–46.
Overlapping primary assignments are blocked. The system rejects OVERLAPPING_ASSIGNMENT (HTTP 409) when a new primary's date range overlaps an existing primary for the same employee. Use auto-end-previous to avoid this entirely.
Future-dated assignments are valid. A new joiner joining 1 May can be assigned today; the assignment activates automatically on the date and the rules engage from her first punch.
Hard-delete only when no attendance. Once a single attendance record exists against an assignment, hard-delete is blocked with ASSIGNMENT_HAS_ATTENDANCE_RECORDS (409). Force-delete sets toDate to yesterday — same end result for active records, but history is preserved.
Cannot delete the only primary. Every employee must have an active primary assignment at any time. Deleting the only primary returns CANNOT_DELETE_PRIMARY_ASSIGNMENT. Assign another department first, then delete the original.
Bulk supports continueOnError mode. When set to true, partial failures (e.g., one invalid employeeId) do not roll back the successful rows. The response separates successful[] and failed[] so the office staff can fix and retry just the failures.
Permission is emp_attendance:manage_assignments. Hand it out via Identity & Access Management. Most schools give it to the Head Clerk and Vice-Principal but not to teachers.
किस मॉड्यूल का हिस्सा
1 moduleअक्सर पूछे गए सवाल
7 सवालCan a teacher be in two departments at the same time?
Yes — but only one can be primary at a time. The primary department's rules govern daily attendance, late-coming, half-day and short-leave; secondary assignments capture board-exam duty, examination cell membership or any cross-functional role for routing approvals or department-specific reports. Most schools have all teachers on a single primary assignment year-round.
What does autoEndPrevious actually change?
When set to true (the default), creating a new primary assignment automatically sets the previous primary's toDate to one day before the new fromDate. The transfer is atomic — no overlap, no gap. With autoEndPrevious=false, the new primary still saves but the old one stays open-ended, which the validator then flags as overlapping. Always leave it on unless you have a specific reason to manage end-dates manually.
Can I assign 100 staff in one go?
Yes — the bulk endpoint accepts up to 100 assignments per call. Beyond that, split the bulk into two calls. The page UI lets you select up to 100 rows with a single click; for a school with 200+ staff, filter by wing or designation and bulk-assign each group separately. Either way the validator and the database support it.
What happens if I delete an assignment that has attendance records?
The system blocks the hard-delete with ASSIGNMENT_HAS_ATTENDANCE_RECORDS (HTTP 409) and tells you exactly how many records exist. Use the force-delete option (force=true) instead — it sets toDate to yesterday, ending the assignment cleanly while preserving every historical record graded against it. This is the only safe path for assignments that have run for any meaningful time.
Can past-month attendance be retrospectively re-graded if I change an old assignment's department?
No. Past attendance is locked against the rules and department that governed each historical day. The system never silently re-grades closed periods. If you need to correct a historical assignment, the recommended path is a manual audit log entry plus a downstream payroll adjustment for that month — Inkwelly's Employee Payroll handles arrears for exactly this case.
Can a future-dated assignment fail validation now and become valid later?
No — validation runs at the moment you submit. If the bulk row references an unknown employeeId or a deactivated department, it fails immediately and is returned in the failed[] array. Assignments that pass validation but reference a future fromDate simply wait — the daily attendance grader picks them up when the date arrives, no further validation needed.
Does the timeline view honour soft-deleted assignments?
Yes — the Department Timeline shows the full history including assignments that were force-deleted (which set toDate to yesterday). Hard-deleted assignments — only possible when zero attendance records exist — disappear from the timeline as if they never existed. This is intentional: hard-delete is the undo within the same day operation, force-delete is the retire with history operation.
आपको ये भी पसंद आ सकता है
2 लेखInkwelly आपके स्कूल पर — खुद देखें
30 मिनट का डेमो। आपके मौजूदा ERP को आपके साथ खोलकर, कॉल पर ही आपका डेटा Inkwelly में लोड करते हैं। कॉल ख़त्म होते-होते एक तय तारीख़ का गो-लाइव प्लान आपके हाथ में।