View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|14157||Development||Other||public||2018-10-19 17:25||2018-11-26 16:59|
|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|
Token : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/Token.php + https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/TokenDynamic.php
Timeing : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/Timing.php + https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/SurveyTimingDynamic.php
|Steps To Reproduce||Think best is to have only Response + Token + Timing each extend Dynamic|
|Tags||No tags attached.|
|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
|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|