Skip to main content

Document Events

The ION Career app hooks into Frappe’s document lifecycle events to automatically process job applicant questions.

Job Applicant Events

doc_events['Job Applicant']['after_insert']
string
Handler: ion_career.handlers.process_job_questionsTriggered automatically after a new Job Applicant document is created. Processes the applicant’s question answers and calculates their score.

Configuration

hooks.py
doc_events = {
  "Job Applicant": {
    "after_insert": "ion_career.handlers.process_job_questions"
  }
}

Event Flow

  1. Job Applicant Created - User submits job application through web form
  2. after_insert Hook Fires - process_job_questions is called automatically
  3. Answers Processed - Question answers are parsed and stored
  4. Score Calculated - Applicant score is computed based on responses
  5. Document Saved - Updated applicant document with answers and score

Fixtures

Fixtures are automatically exported/imported configurations for the app.

Custom Fields

{
    "doctype": "Custom Field",
    "filters": [["module", "=", "ION Career"]]
}
Exports all custom fields added by the ION Career module to standard Frappe doctypes (like Job Applicant and Job Opening).

Client Scripts

{
    "doctype": "Client Script",
    "filters": [["module", "=", "ION Career"]]
}
Exports client-side JavaScript that runs in the browser for ION Career forms.

Server Scripts

{
    "doctype": "Server Script",
    "filters": [["module", "=", "ION Career"]]
}
Exports server-side Python scripts configured through the Frappe UI.

Web Forms

{
    "doctype": "Web Form",
    "filters": [["module", "=", "ION Career"]]
}
Exports the job application web form configuration.

Complete Fixtures Configuration

hooks.py
fixtures = [
    {
        "doctype": "Custom Field",
        "filters": [["module", "=", "ION Career"]]
    },
    {
        "doctype": "Client Script",
        "filters": [["module", "=", "ION Career"]]
    },
    {
        "doctype": "Server Script",
        "filters": [["module", "=", "ION Career"]]
    },
    {
        "doctype": "Web Form",
        "filters": [["module", "=", "ION Career"]]
    },
]

Usage

Export Fixtures

bench --site your-site export-fixtures

Import Fixtures

bench --site your-site migrate
Fixtures are automatically imported during app installation and migration.

Build docs developers (and LLMs) love