View Issue Details

IDProjectCategoryView StatusLast Update
17274Development Otherpublic2021-04-26 19:24
Reporterollehar Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Summary17274: Add a data-transfer object (DTO) for question attribute
DescriptionThere'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.

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

ollehar

ollehar

2021-04-26 19:24

administrator   ~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 View Revisions
2021-04-26 19:24 ollehar Note Added: 64165