Velocity Templates(.vm files) not being rendered

We are migrating our plugin from Jira v9.x to Jira v10.0.1:
Now, when we migrate from Jira 9 to Jira 10, we are facing an issue that the vm templates are not being rendered.
Basically, we are using servlet to redirect to the vm template, but seems that due to some reason the vm templates are not being rendered:

Can you please guide me on is there any configuration changes or other changes required to render these vm templates:

<web-panel name="bdd-issues-webpanel"
		i18n-name-key="ABC" key="bdd-issues-webpanel"
		location="atl.jira.view.issue.left.context" weight="250">
		<resource name="view" type="velocity"><![CDATA[<iframe id='issuebdd' scrolling="yes" src="${helper.request.contextPath}/plugins/servlet/issuebdd?id=${issue.key}&projectkey=${project.key}"></iframe>]]></resource>
		<conditions type="AND">
			<condition	class="com.atlassian.xvy.conditions.xvyEnableConditionForProject" />
			<condition	class="com.atlassian.xvy.conditions.xvyEnableConditionForIssueType" />
		</conditions>
	</web-panel>

<servlet name="issue-bdd" i18n-name-key="issue-bdd.name"
		key="issue-bdd-servlet" class="com.atlassian.xvy.servlet.ABCServlet">
		<url-pattern>/ABC</url-pattern>
	</servlet>

Hello,

Checkout Jira Software 10.0.x upgrade notes | Atlassian Support | Atlassian Documentation resp.
https://developer.atlassian.com/server/framework/atlassian-sdk/velocity-file-allowlist/

Regards,
Christian

Hello @ChristianSantej ,

resource.loader.file.allowlist = "UI/bdd_issue.vm,"
file.resource.loader.filetype.allowlist = ".vm, .vtl"

I already have this in my application.properties file, but still not working

Hello,

Have you also checked the related documentation here: https://developer.atlassian.com/server/framework/atlassian-sdk/configuring-the-velocity-allowlist/

With the help of the mentioned documentation links we were able to resolve the issue.

Regards,
Christian

@ChristianSantej ,
Yes, I went through that documentation but since we are not using any Java class method in the vm templates, I don’t think there’s a requirement to add the element.

Even though I tried it, but seems not to be working.

Hi @YashChandarana,
have you tried to update the dependency?

<dependency>
    <groupId>com.atlassian.jira.velocity</groupId>
    <artifactId>atlassian-jira-velocity-templates</artifactId>
    <version>10.0.1</version>
</dependency>

Maybe it helps :slight_smile:

Cheers,
Daniel

Hi @DanielGrabke,
We have found the solution to this issue, the root cause was the usage of com.atlassian.fugue.* package which has been deprecated in Jira10, so we migrated it to io.atlassian.fugue.* and it’s working after that

1 Like