FTR what I had started to write when I realized that the issue was the migrator:
#if ($xcontext.action == 'admin' && "$!configObject" == '')
## TODO: Refactor all this in java to make it more bulletproof.
## Make sure that if the JIRAConfig doc is created, it's created as hidden.
## And if the JIRA.WebHome doc doesn't exist, that it's created with has some content and that it's marked as hidden.
## (so that the Navigation Panel configuration automatically excludes it from the navigation tree).
#set ($jiraHomeDoc = $xwiki.getDocument('JIRA.WebHome'))
#if ($jiraHomeDoc.isNew())
#set ($discard = $jiraHomeDoc.setContent('Holds configuration for JIRA features.'))
#set ($discard = $jiraHomeDoc.setHidden(true))
#set ($discard = $jiraHomeDoc.setSyntaxId('xwiki/2.1'))
#set ($discard = $jiraHomeDoc.save('Created JIRA configuration home page', true))
#end
#if ($configDoc.isNew())
#set ($discard = $configDoc.setSyntaxId('xwiki/2.1'))
#set ($discard = $configDoc.setHidden(true))
#end
#set ($configObject = $configDoc.newObject($configClassName))
#set ($discard = $configDoc.save('Created empty JIRA configuration', true))
#end
IMO the migrator needs to be modified to: 1) not be called a migrator since it does more than that. It's actually a jira configuration creator 2) make sure to create the JIRA.JIRAConfig doc as hidden 3) Create the JIRA.WebHome page with some default content + set it as hidden so that the nav panel excludes the jira app from the nav tree on subwikis
Vincent Massol on 10/Feb/26 10:42
FTR what I had started to write when I realized that the issue was the migrator:
{code} #if ($xcontext.action == 'admin' && "$!configObject" == '') ## TODO: Refactor all this in java to make it more bulletproof. ## Make sure that if the JIRAConfig doc is created, it's created as hidden. ## And if the JIRA.WebHome doc doesn't exist, that it's created with has some content and that it's marked as hidden. ## (so that the Navigation Panel configuration automatically excludes it from the navigation tree). #set ($jiraHomeDoc = $xwiki.getDocument('JIRA.WebHome')) #if ($jiraHomeDoc.isNew()) #set ($discard = $jiraHomeDoc.setContent('Holds configuration for JIRA features.')) #set ($discard = $jiraHomeDoc.setHidden(true)) #set ($discard = $jiraHomeDoc.setSyntaxId('xwiki/2.1')) #set ($discard = $jiraHomeDoc.save('Created JIRA configuration home page', true)) #end #if ($configDoc.isNew()) #set ($discard = $configDoc.setSyntaxId('xwiki/2.1')) #set ($discard = $configDoc.setHidden(true)) #end #set ($configObject = $configDoc.newObject($configClassName)) #set ($discard = $configDoc.save('Created empty JIRA configuration', true)) #end {code}
IMO the migrator needs to be modified to: 1) not be called a migrator since it does more than that. It's actually a jira configuration creator 2) make sure to create the JIRA.JIRAConfig doc as hidden 3) Create the JIRA.WebHome page with some default content + set it as hidden so that the nav panel excludes the jira app from the nav tree on subwikis 4) remove the doc creation code at https://github.com/xwiki-contrib/jira/blob/59c7d51b45ee8ad8fad29b732462b2390fa280dd/jira-config/jira-config-ui/src/main/resources/JIRA/JIRAConfigSheet.xml#L48
Vincent Massol on 10/Feb/26 10:44
FTR what I had started to write when I realized that the issue was the migrator:
{code} #if ($xcontext.action == 'admin' && "$!configObject" == '') ## TODO: Refactor all this in java to make it more bulletproof. ## Make sure that if the JIRAConfig doc is created, it's created as hidden. ## And if the JIRA.WebHome doc doesn't exist, that it's created with has some content and that it's marked as hidden. ## (so that the Navigation Panel configuration automatically excludes it from the navigation tree). #set ($jiraHomeDoc = $xwiki.getDocument('JIRA.WebHome')) #if ($jiraHomeDoc.isNew()) #set ($discard = $jiraHomeDoc.setContent('Holds configuration for JIRA features.')) #set ($discard = $jiraHomeDoc.setHidden(true)) #set ($discard = $jiraHomeDoc.setSyntaxId('xwiki/2.1')) #set ($discard = $jiraHomeDoc.save('Created JIRA configuration home page', true)) #end #if ($configDoc.isNew()) #set ($discard = $configDoc.setSyntaxId('xwiki/2.1')) #set ($discard = $configDoc.setHidden(true)) #end #set ($configObject = $configDoc.newObject($configClassName)) #set ($discard = $configDoc.save('Created empty JIRA configuration', true)) #end {code}
IMO the migrator needs to be modified to: 1) not be called a migrator since it does more than that. It's actually a jira configuration creator 2) make sure to create the JIRA.JIRAConfig doc as hidden 3) Create the JIRA.WebHome page with some default content + set it as hidden so that the nav panel excludes the jira app from the nav tree on subwikis 4) remove the doc creation code at https://github.com/xwiki-contrib/jira/blob/59c7d51b45ee8ad8fad29b732462b2390fa280dd/jira-config/jira-config-ui/src/main/resources/JIRA/JIRAConfigSheet.xml#L48
There's one little thing to verify: that if a subwiki has a jira configuration, it's used properly. I haven't checked this but I supposed it's a feature.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.