Skip to main content

Overview

The Job Question Set DocType represents a reusable collection of questions that can be associated with one or more Job Openings. It allows HR teams to create standardized questionnaires for different types of positions.

Fields

title
Data
required
Unique title for the question set. Used as the document name.Properties:
  • Must be unique
  • Used for automatic naming (autoname: field:title)
questions
Table
Child table containing Job Question recordsChild DocType: Job QuestionEach row represents a question with its configuration (text, type, required status, etc.)

Permissions

System Manager
Role
Full access to create, read, update, delete, export, and share Job Question SetsPermissions:
  • Create: ✓
  • Read: ✓
  • Write: ✓
  • Delete: ✓
  • Email: ✓
  • Print: ✓
  • Export: ✓
  • Report: ✓
  • Share: ✓

JSON Structure

{
  "doctype": "DocType",
  "name": "Job Question Set",
  "module": "ION Career",
  "autoname": "field:title",
  "allow_rename": 1,
  "naming_rule": "By fieldname",
  "fields": [
    {
      "fieldname": "title",
      "fieldtype": "Data",
      "label": "Title",
      "unique": 1
    },
    {
      "fieldname": "questions",
      "fieldtype": "Table",
      "label": "Questions",
      "options": "Job Question"
    }
  ],
  "permissions": [
    {
      "role": "System Manager",
      "create": 1,
      "read": 1,
      "write": 1,
      "delete": 1,
      "email": 1,
      "print": 1,
      "export": 1,
      "report": 1,
      "share": 1
    }
  ]
}

Usage

Creating a Question Set

import frappe

# Create a new Job Question Set
qset = frappe.get_doc({
    "doctype": "Job Question Set",
    "title": "Software Engineer Screening",
    "questions": [
        {
            "question": "Do you have 5+ years of Python experience?",
            "fieldname": "python_experience",
            "input_type": "Select",
            "required": 1,
            "order": 1
        },
        {
            "question": "Are you familiar with Frappe Framework?",
            "fieldname": "frappe_knowledge",
            "input_type": "Checkbox",
            "required": 0,
            "order": 2
        }
    ]
})
qset.insert()

Linking to Job Opening

# Link the question set to a job opening
job = frappe.get_doc("Job Opening", "Software Engineer - 2024")
job.custom_job_question_set = "Software Engineer Screening"
job.save()

Retrieving Questions

# Get all questions in a set
qset = frappe.get_doc("Job Question Set", "Software Engineer Screening")

for q in qset.questions:
    print(f"{q.question} - Required: {q.required}")

Example Document

{
    "doctype": "Job Question Set",
    "name": "Senior Developer Questions",
    "title": "Senior Developer Questions",
    "questions": [
        {
            "doctype": "Job Question",
            "question": "Do you have 5+ years experience?",
            "fieldname": "experience_5_years",
            "input_type": "Select",
            "required": 1,
            "order": 1
        },
        {
            "doctype": "Job Question",
            "question": "Are you authorized to work in the country?",
            "fieldname": "work_authorization",
            "input_type": "Checkbox",
            "required": 1,
            "order": 2
        },
        {
            "doctype": "Job Question",
            "question": "Do you have experience with microservices?",
            "fieldname": "microservices_exp",
            "input_type": "Select",
            "required": 0,
            "order": 3
        }
    ]
}

API Methods

Build docs developers (and LLMs) love