View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|12865||Development||Other||public||2017-11-02 18:17||2017-12-04 12:00|
|Summary||12865: Unable to use createFieldMap in console|
|Description||createFieldMap function is used for … a lot of thing, but we are unable to use it in console because this function use Yii::app()->session|
|Steps To Reproduce||Create a plugin or a console controller and add createFieldMap function call|
|Tags||No tags attached.|
See https://framagit.org/snippets/860 for a quick plugin example.
Set $aSurveys to existing var.
Currently i redo a helpers/common but then : need to copy/paste a lot lot lot of function …
We are using these lines for faking a session:
// Faking a session here.
Great, i give it a trye :).
Still : i think we must remove session usage in createFieldMap : use Cache (some specific cache)
|Was just about to say what Mazi said: Just hack into $_SESSION.|
|I do that in the unit tests, too.|
Because : i think we really need a fieldMap without any session/user related system.
fieldMap for export for example .
And with a fieldMap unrelated to session and user : we can start a real cache system. This fieldMap function can take a really long time, make a big session file. If you hav 20 user at same time : i really think a lot of part can goes in a real cache and improve speed.
It's a Development mantis, not a bug
If we talk about the very useful fieldmap: How about adding a function to LS API for easily getting the fieldmap for a given survey ID?
That was planned a while ago and will be pretty useful for others.
|Can I close this? This is a feature request IMO, not a bug.|
|@olle : it's not in bug , nether in feature request … it's Project/Development . Development is more (for me) : make it better for reusage/understand/adapt … but this don't fix bug or add new feature …|
|I see. I thought "Development" was for LS 3 only, sorry.|
|Oh non, really more old :)|
|2017-11-02 18:17||DenisChenu||New Issue|
|2017-11-02 18:19||DenisChenu||Note Added: 44936|
|2017-11-03 09:08||Mazi||Note Added: 44937|
|2017-11-03 09:41||DenisChenu||Note Added: 44938|
|2017-12-01 13:58||ollehar||Note Added: 45218|
|2017-12-01 13:59||ollehar||Note Added: 45219|
|2017-12-01 14:02||DenisChenu||Note Added: 45220|
|2017-12-01 14:17||Mazi||Note Added: 45223|
|2017-12-04 11:04||ollehar||Note Added: 45230|
|2017-12-04 11:04||ollehar||Assigned To||=> ollehar|
|2017-12-04 11:04||ollehar||Status||new => feedback|
|2017-12-04 11:11||DenisChenu||Note Added: 45231|
|2017-12-04 11:11||DenisChenu||Status||feedback => assigned|
|2017-12-04 11:56||ollehar||Note Added: 45240|
|2017-12-04 12:00||DenisChenu||Note Added: 45241|