Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Create or update a question for a library component item

Creates a new question for a component library item or updates an existing question if id is provided in the request body.

What are Questions? Questions capture customer-specific requirements or project details in a structured way. They make work packages flexible and reusable by allowing later individualization in projects.

Question Types:

  • ShortText: Single-line text input (name, title, keyword)
  • Editor: Formatted multi-line text (descriptions, free text)
  • Checkbox: Yes/No selection (can impact effort calculation)
  • Radio: Single choice from multiple options (can impact effort)
  • Files: Upload files (logos, documents, graphics)
  • Datepicker: Select a date (deadlines, delivery dates)
  • Multiplier: Dynamic calculation based on quantity (e.g., “How many pages?” × duration per page = total effort)
  • Person: Select person(s) from project team or clients

Key Features:

  • Answers can automatically affect effort calculation
  • Questions can have conditions (shown only if other questions answered a certain way)
  • Multiplier questions calculate: Answer × Duration per element = Total additional effort
  • In library components, questions are defined but not answered

For Checkbox/Radio types, at least one option must be provided. Description field accepts HTML or Markdown input and returns HTML format. Only library component items (component.projectId is null) are accessible through this endpoint.

POST/administration/project-components/item-details/{itemId}/questions
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
itemIdstringrequired
Component item UUID. Items are the building blocks within components (Epics, Work Packages, Todo Lists, Test Suites).
Request body
requiredapplication/json
conditionsQuestionConditionDto[]
Question conditions that control visibility/behavior. Conditions can show/hide questions based on answers to other questions, todo completion, or test case status.
Show properties
Array of QuestionConditionDto
containsTypestring
Contains type
Allowed:SomeAll
idstring
Condition ID (for updates)
targetQuestionIdstring
Target question ID
targetTestCaseIdstring
Target test case ID
targetTodoIdstring
Target todo ID
targetValuestring
Target value
typestringrequired
Condition type. Conditions control when items or questions are visible/active: - **QuestionAnswered/QuestionNotAnswered**: Based on whether a question is answered - **QuestionAnswerEqual/QuestionAnswerDoesNotEqual**: Based on specific answer value - **QuestionAnswerContains/QuestionAnswerDoesNotContain**: Based on answer containing values - **TodoIsDone/TodoIsNotDone**: Based on todo completion status - **TestCasePassed/TestCaseFailed**: Based on test case evaluation
Allowed:QuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFailed
descriptionstring
Question description (accepts HTML or Markdown, returns HTML)
idstring
Question ID (for updates - if provided, updates existing question)
multiplierValuenumber
Multiplier value (for Multiplier type). This is the duration per element (e.g., hours per page). When answered, the system calculates: Answer × multiplierValue = Total additional effort.
optionsQuestionOptionDto[]
Question options (required for Checkbox/Radio types, must have at least one option). Each option can have an extraHours value that affects effort calculation when selected.
Show properties
Array of QuestionOptionDto
extraHoursnumber
Extra hours for this option. When this option is selected (for Checkbox/Radio questions), this value is added to the effort calculation.
idstring
Option ID (for updates)
titlestringrequired
Option title. For Checkbox questions, users can select multiple options. For Radio questions, users can select only one option.
questionstringrequired
The question text that will be displayed to users. This is the actual question being asked (e.g., "Please specify the expected response time").
titlestringrequired
Question title/heading. Questions capture customer-specific requirements or project details. They make work packages flexible and reusable by allowing later individualization in projects.
typestringrequired
Question type. Questions can be: - **ShortText**: Single-line text input - **Editor**: Formatted multi-line text - **Checkbox**: Yes/No selection (can impact effort) - **Radio**: Single choice from options (can impact effort) - **Files**: Upload files - **Datepicker**: Select a date - **Multiplier**: Dynamic calculation (quantity × duration per element) - **Person**: Select person(s) from team
Allowed:ShortTextEditorCheckboxRadioFilesDatepickerMultiplierPerson
Responses
200Question created or updated successfully
idstring
successboolean
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/administration/project-components/item-details/3047983b-d798-4aff-8dd4-628cf1900703/questions" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "conditions": [
    {
      "containsType": "Some",
      "id": "e57dc37b-7693-4d06-b49c-17084b773aff",
      "targetQuestionId": "e57dc37b-7693-4d06-b49c-17084b773aff",
      "targetTestCaseId": "e57dc37b-7693-4d06-b49c-17084b773aff",
      "targetTodoId": "e57dc37b-7693-4d06-b49c-17084b773aff",
      "targetValue": "Yes",
      "type": "QuestionAnswered"
    }
  ],
  "description": "<p>This question helps us understand performance requirements.</p>",
  "id": "e57dc37b-7693-4d06-b49c-17084b773aff",
  "multiplierValue": 1.5,
  "options": [
    {
      "extraHours": 2.5,
      "id": "e57dc37b-7693-4d06-b49c-17084b773aff",
      "title": "Option A"
    }
  ],
  "question": "Please specify the expected response time",
  "title": "What is the expected performance?",
  "type": "ShortText"
}'
Response
{
  "id": "e57dc37b-7693-4d06-b49c-17084b773aff",
  "success": true
}