Change
Topics mentioned in source code are module pieces
Issue description
Topics which are mentioned in the source code should be included in the module. These can be domain instances or schema instances. The mention is in most cases perfomed by using the id topic the topic or a topic reference. But also the sernames in the API are strictly speaking mentions, but these are left aside currently.
Developer comments
This is restricted to certain topic types, currently only instances of note template will be added.
Most topic references in the source code refer to instances of these topic types:
* note template (php)
* user group (php, css)
* user (php)
* view (php, js)
* topic-type (php, js)
* service (php, js)
Upon import the import the mention is mapped to the local ids.
Mentioned system topics cause currently problems upon import, since the mentioned topic id cannot be mapped onto a local id. There is mainly one use case for this: when a CSS file contains rules that apply to the system user groups, mainly User, but also Administrator. Unauthenticaled can remain as is, since it uses a 0 instead of the local topic id of the system topic. See [13351, this issue].
For any mention of a topic in code there is two aspects to consider:
; *Extensional aspect*: How does it affect the contents of the module?
; *Mapping aspect*: Does the code have to be adjusted so that it works as intented after import?
For the *extensional aspect* two things that can happen: the mentioned topic becomes a piece of the module. It may be an instant piece (without further action by the administrator) or a dubious piece. In the latter case the administrator has to add a part so that the module is complete or remove the mention.
Regarding the *mapping aspect*: some mentions do not require any modification of the source code: txt calls and the use of sernames to refer to topic types or services. Any other mention requires a change in the code so that it will function as intended.
If a module contains a dubious piece, it is "broken" in a sense: it cannot be guranteed that it will work completely and correctly after import. A broken module should be still be releaseable, in order to empower the administrator, who knows what he is doing.
|
Work sessions3
Start |
2024-07-04T08:05:00
|
End |
2024-07-04T11:09:49
|
Participant |
Robert Cerny
|
Start |
2024-08-04T13:57:44
|
End |
2024-08-04T14:57:50
|
Participant |
Robert Cerny
|
Start |
2024-08-04T16:37:42
|
End |
2024-08-04T17:14:58
|
Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.