View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 14157 | Bug reports | Other | public | 2018-10-19 17:25 | 2026-11-20 12:33 |
| Reporter | DenisChenu | Assigned To | |||
| Priority | normal | Severity | minor | ||
| Status | acknowledged | Resolution | open | ||
| Summary | 14157: 2 token dynamic model + 2 survey dynamic model | ||||
| Description | Survey : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/SurveyDynamic.php + https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/Response.php | ||||
| Steps To Reproduce | Think best is to have only Response + Token + Timing each extend Dynamic | ||||
| Tags | No tags attached. | ||||
| Bug heat | 4 | ||||
| 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 URL | https://github.com/LimeSurvey/LimeSurvey/pull/5581 | ||||
| related to | 14251 | closed | DenisChenu | When deleting a token : CPDB keep link with survey |
|
I'd prefer to start with "No function should be longer than 60 lines" if we want to refactor things. |
|
|
It's not really refactoring, but when we need to fix a function : where did we fix it preferably ? One class can call another class, but if we go like this : next time we fix in a class, but not in other. And 2 month after : we get a new "same" bug Choose quickly makes corrections in the right place, and add a call to good class on another one. |
|
|
Sounds like code duplication? |
|
|
Yep, and have 2 model for same table => more chance of duplication … In https://github.com/LimeSurvey/LimeSurvey/commit/3579c93e529792463e8b3fe44671830fe78d06f3#diff-9cfdc794610e572e6db5e2eca5e364bc : i choose to call a \Token function from \TokenDynamic , but maybe aothe dev want to call a \TokenDynamic from \Token . If we choose : move step by step \Token to \TokenDynamic OR \TokenDynamic to \Token it's better |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-10-19 17:25 | DenisChenu | New Issue | |
| 2018-11-13 23:50 | DenisChenu | Relationship added | related to 14251 |
| 2018-11-26 13:36 | ollehar | Note Added: 49783 | |
| 2018-11-26 14:52 | DenisChenu | Note Added: 49784 | |
| 2018-11-26 15:41 | ollehar | Note Added: 49785 | |
| 2018-11-26 16:59 | DenisChenu | Note Added: 49787 | |
| 2021-09-17 11:10 | ollehar | Priority | none => normal |
| 2026-11-19 22:50 | c_schmitz | Status | new => acknowledged |
| 2026-11-20 12:33 | c_schmitz | Git branch / Pull Request URL | => https://github.com/LimeSurvey/LimeSurvey/pull/5581 |