<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 04:11:15 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MAGNOLIA-6093] Create mgnlSystem and mgnlVersion workspaces for each repository without registering in repositories.xml config</title>
                <link>https://jira.magnolia-cms.com/browse/MAGNOLIA-6093</link>
                <project id="10000" key="MAGNOLIA">Magnolia</project>
                    <description>&lt;p&gt;Workspaces will be created for each repository registered in &lt;tt&gt;repositories.xml&lt;/tt&gt; config file without need to specify and map them in the mentioned config file.&lt;br/&gt;
Workspace physical names: mgnlSystem, mgnlVersion&lt;br/&gt;
Workspace logical names (used to obtain sessions for example): &amp;lt;repositoryId&amp;gt;-mgnlSystem, &amp;lt;repositoryId&amp;gt;-mgnlVersion&lt;/p&gt;</description>
                <environment></environment>
        <key id="43254">MAGNOLIA-6093</key>
            <summary>Create mgnlSystem and mgnlVersion workspaces for each repository without registering in repositories.xml config</summary>
                <type id="5" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10896&amp;avatarType=issuetype">Sub-task</type>
                            <parent id="41301">MAGNOLIA-5975</parent>
                                    <priority id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/neutral.gif">Neutral</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="had">Jan Haderka</assignee>
                                    <reporter username="jsimak">Jaroslav Simak</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Feb 2015 10:15:11 +0100</created>
                <updated>Fri, 6 Nov 2015 15:10:07 +0100</updated>
                            <resolved>Mon, 30 Mar 2015 12:59:06 +0200</resolved>
                                                    <fixVersion>5.4</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="99722" author="had" created="Wed, 4 Mar 2015 11:15:05 +0100"  >&lt;p&gt;Check for workspace name in &lt;tt&gt;MgnlVersioningNodeWrapper&lt;/tt&gt; should probably use endsWith(&quot;-&quot; + workspaceName) rather then contains to minimize possibility of false positives.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;MgnlLogicalNamed*Wrapper&lt;/tt&gt; would be less confusing with name like &lt;tt&gt;MgnlLogicalWorkspaceNameMapping*Wrapper&lt;/tt&gt; or similar. As it is, those wrapper names mislead everyone to think that they might do some renaming of nodes or properties.&lt;/p&gt;

&lt;p&gt;Shouldn&apos;t there be also change in default &lt;tt&gt;repositories.xml&lt;/tt&gt; in empty webapp to remove manual &lt;tt&gt;mgnlVersion&lt;/tt&gt; and &lt;tt&gt;mgnlSystem&lt;/tt&gt; mappings or were they never defined there?&lt;/p&gt;</comment>
                            <comment id="99769" author="jsimak" created="Thu, 5 Mar 2015 09:18:09 +0100"  >&lt;p&gt;&lt;a href=&quot;https://git.magnolia-cms.com/gitweb/?p=magnolia_main.git;a=shortlog;h=refs/heads/MAGNOLIA-5975&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.magnolia-cms.com/gitweb/?p=magnolia_main.git;a=shortlog;h=refs/heads/MAGNOLIA-5975&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.magnolia-cms.com/gitweb/?p=ce-bundle.git;a=shortlog;h=refs/heads/MAGNOLIA-5975&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.magnolia-cms.com/gitweb/?p=ce-bundle.git;a=shortlog;h=refs/heads/MAGNOLIA-5975&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="100805" author="gjoseph" created="Fri, 20 Mar 2015 14:58:05 +0100"  >&lt;p&gt;Javadoc for wrappers.&lt;br/&gt;
Since this is a non-trivial change, it needs to be well documented. At least, please describe the design of the change and their implication in the main task.&lt;/p&gt;</comment>
                            <comment id="101536" author="gjoseph" created="Tue, 7 Apr 2015 11:13:55 +0200"  >&lt;p&gt;Ok seems good - I&apos;d just like to take a moment to see if we can improve something test-wise (e.g I suspect we could inject &lt;tt&gt;RepositoryManager&lt;/tt&gt; where something-somewhere probably calls &lt;tt&gt;Components.getInstance()&lt;/tt&gt;; would simplify tests AND prod code)&lt;/p&gt;</comment>
                            <comment id="101554" author="gjoseph" created="Tue, 7 Apr 2015 15:07:22 +0200"  >&lt;p&gt;This was most likely already this way, but in &lt;a href=&quot;http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;good boy scout fashion&lt;/a&gt;, let&apos;s try to improve existing code and remove debt where we see it.&lt;br/&gt;
In a unit test, typically, you&apos;ll instantiate the class-under-test yourself. e.g in &lt;tt&gt;FooBarTest&lt;/tt&gt;, typically, you should find a &lt;tt&gt;new FooBar()&lt;/tt&gt; somewhere.&lt;/p&gt;

&lt;p&gt;In &lt;tt&gt;DefaultRepositoryManagerTest&lt;/tt&gt;, we do this &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-comment&quot;&gt;// GIVEN
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; DefaultRepositoryManager manager = (DefaultRepositoryManager) Components.getComponent(RepositoryManager.class);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;which makes way for a number of possible side effects and unwanted interactions with the test. Simplify !&lt;/p&gt;</comment>
                            <comment id="101555" author="gjoseph" created="Tue, 7 Apr 2015 15:23:42 +0200"  >&lt;p&gt;Hmmm and one dubious change that escaped me at first sight are those 2, hidden in &lt;tt&gt;DefaultContent#delete()&lt;/tt&gt;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;-        if (!workspaceName.startsWith(&quot;mgnl&quot;)) {
+        if (!(workspaceName.endsWith(&quot;-&quot; + RepositoryConstants.VERSION_STORE) || workspaceName.endsWith(&quot;-&quot; + RepositoryConstants.SYSTEM))) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;-                        Session session = MgnlContext.getJCRSession(&quot;mgnlVersion&quot;);
+                        Session session = MgnlContext.getJCRSession(repositoryManager.getRepositoryNameForWorkspace(workspaceName) + &quot;-&quot; + RepositoryConstants.VERSION_STORE);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;These 2 lines were not ideal, but now they cary a whole bunch of implications that should be &quot;hidden&quot; somewhere in RepositoryManager or some other component.&lt;/p&gt;</comment>
                            <comment id="101556" author="gjoseph" created="Tue, 7 Apr 2015 15:56:02 +0200"  >&lt;p&gt;I found the above snippet in a couple of other locations; while it&apos;s very limited and seems to often be related to deletes, I&apos;d really like if we could abstract that somewhere else; likewise, I&apos;d like it if we could remove the &lt;tt&gt;MgnlContext.getHierarchyManager()&lt;/tt&gt; calls this does, especially when they&apos;re done in a &lt;tt&gt;MgnlContext.doInSystemContext()&lt;/tt&gt; block, which makes things are to debug, read and test.&lt;/p&gt;

&lt;p&gt;When that&apos;s done, it might become much clearer how to address the test problem: rather than add &lt;tt&gt;ComponentsTestUtil.setImplementation(RepositoryManager.class, DefaultRepositoryManager.class)&lt;/tt&gt; we might be able to inject RepoMan in more appropriate places; MockNode and MockContent could use their own &lt;tt&gt;MockRepositoryManager&lt;/tt&gt; instead of rely on &lt;tt&gt;Components&lt;/tt&gt; being set for each and every test.&lt;/p&gt;

&lt;p&gt;The &quot;funny&quot; thing is tried to adjust MockContent to &quot;force&quot; it to use a &lt;tt&gt;MockRepositoryManager&lt;/tt&gt;. My local MockRepositoryManager did nothing but throw exceptions, and yet, when running all core-tests, it wasn&apos;t invoked once.&lt;/p&gt;

&lt;p&gt;In short, there&apos;s 2 things I&apos;d suggest we look into&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;avoid string concat and other voodoo to get version sessions, within classes that should not know about this (e.g &lt;tt&gt;DefaultContent&lt;/tt&gt;)&lt;/li&gt;
	&lt;li&gt;avoid breaking all modules when we merge because it&apos;d require yet another call to ComponentTestUtil to setup an only-vaguely related component (most tests that suffer from this are not testing anything about the repo, but they just so happen to use &lt;em&gt;some&lt;/em&gt; content); ComponentTestUtil needs to go, so let&apos;s try to not &lt;em&gt;add&lt;/em&gt; usages for new features.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="101642" author="had" created="Wed, 8 Apr 2015 13:55:29 +0200"  >&lt;blockquote&gt;&lt;p&gt;These 2 lines were not ideal, but now they cary a whole bunch of implications that should be &quot;hidden&quot; somewhere in RepositoryManager or some other component.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I would argue that &lt;tt&gt;DefaultContent&lt;/tt&gt; is already deprecated and it&apos;s not worth of adding extra method to &lt;tt&gt;RepositoryManager&lt;/tt&gt; just to hide those implications. We do not have same problems when working with &lt;tt&gt;Node&lt;/tt&gt; API directly.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The &quot;funny&quot; thing is tried to adjust MockContent to &quot;force&quot; it to use a MockRepositoryManager. My local MockRepositoryManager did nothing but throw exceptions, and yet, when running all core-tests, it wasn&apos;t invoked once.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;AFAIK for most if not all uses of &lt;tt&gt;MockContent&lt;/tt&gt;/&lt;tt&gt;MockSession&lt;/tt&gt; they &quot;manage&quot; content in memory w/o real repo behind so they indeed should not need to use &lt;tt&gt;RepositoryManager&lt;/tt&gt; it just have to be available for injection.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10160">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10040">
                    <name>causality</name>
                                                                <inwardlinks description="is causing">
                                        <issuelink>
            <issuekey id="48647">MAGNOLIA-6427</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>magnolia-cms.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 4 Mar 2015 11:15:05 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ajones</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 45 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>had</customfieldvalue>
            <customfieldvalue>jsimak</customfieldvalue>
            <customfieldvalue>gjoseph</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i04ol3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>27467</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>