Unable to render Object reference in Velocity template in Jira 10.5.0 version

For the code snippet below, I am not able to render the value in the object reference in Jira 10.5.0 version; “$execStatus.name” is being rendered in the UI as a string and it is not able to load the value inside the Object reference.
Note:

  1. The object is not empty I have verified from the backend
  2. Tried fetching the data via getter method of the Model class
  3. Also tried updating the fugue dependency in pom.xl that also didn’t work
  4. Converted the ArrayList to a Map and then tried rendering it that also didn’t work

Checked in the previous versions its working as expected. I could not find anything in the release notes as well specific to this issue. Its a Blocker can someone help me with this as its breaking the apps functionality.

Code :

#foreach($execStatus in $action.stepExecutionStatusList)

$execStatus.name
$execStatus.description


        <td>
            <ul class="operations-list">
                    <li><a href="EditZephyrTestStepStatus!default.jspa?id=$execStatus.id">$i18n.getText("common.words.edit")</a></li>
				#if($execStatus.type == 1)
                    <li><a href="DeleteZephyrTestStepStatus!default.jspa?id=$execStatus.id&amp;name=$execStatus.name">$i18n.getText("common.words.delete")</a></li>
    		    #end
            </ul>
        </td>
	</tr>
#end

Hi @aakashshaw ,
You should add allow-list to your atlassian-plugin.xml i.e.

<velocity-allowlist key="velocity-allowlist" name="Velocity Allowlist">
    <!--  here is your models  -->
    <method>com.some.company.jira.model.StepExecutionStatusModel#getName()</method>
    <method>com.some.company.jira.model.StepExecutionStatusModel#getDescription()</method>
    ...etc
</velocity-allowlist>

More info and details you can find here

1 Like

Hi @RostykChuma1 I have tried the solution and added it to the Velocity-allowlist in atlassian-pulgin.xml its not working and it s still giving the same result