View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
17274Bug reportsOtherpublic2026-11-20 11:15
Reporterollehar Assigned To 
PrioritynoneSeverityminor 
Status closedResolutionwon't fix 
Summary17274: Add a data-transfer object (DTO) for question attribute
Description

There's some serious domain confusion in the way question attributes were designed.

The class QuestionAttribute does NOT represent a question attribute BUT a question attribute VALUE.

TODO:

1) Rename QuestionAttribute model to QuestionAttributeValue

2) Add a new model or DTO for QuestionAttribute

Example: This function should return a QuestionAttribute (when defined correctly):

public static function getDefaultSettings()
{
    return array(
        "name" => null,
        "caption" => '',
        "inputtype" => "text",
        "options" => null,
        "category" => gT("Attribute"),
        "default" => '',
        "help" => '',
        "value" => '',
        "sortorder" => 1000,
        "i18n" => false,
        "readonly" => false,
        "readonly_when_active" => false,
        "expression" => null,
    );
}

Also compare with participant attribute db design:

| lime_participant_attribute |
| lime_participant_attribute_names |
| lime_participant_attribute_names_lang |
| lime_participant_attribute_values |

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URLN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2021-04-26 19:24

reporter   ~64165

Ping @DenisChenu and @gabrieljenik, if you're interested in improving this.

Issue History

Date Modified Username Field Change
2021-04-26 19:21 ollehar New Issue
2021-04-26 19:23 ollehar Description Updated
2021-04-26 19:24 ollehar Note Added: 64165
2026-11-19 22:50 c_schmitz Status new => acknowledged
2026-11-20 11:15 c_schmitz Status acknowledged => closed
2026-11-20 11:15 c_schmitz Resolution open => @0@
2026-11-20 11:15 c_schmitz Resolution @0@ => won't fix