It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Requiere resources in *.vm Edited

Hello ,

I am trying to add https://docs.atlassian.com/aui/8.5.1/docs/single-select.html

to my custom *.vm file but I can't make it work.

Not working:

  • $webResourceManager.requireResourcesForContext("com.atlassian.auiplugin:aui-select"
  • #requireResourcesForContext("com.atlassian.auiplugin:aui-select")

Thank you in advance

4 answers

 

Hello @Adria Alonso 

For single select you can use this

$webResourceManager.requireResource("com.atlassian.auiplugin:aui-select")

or Select2 you can use this

$webResourceManager.requireResource("com.atlassian.auiplugin:aui-select2") 

It just shows it as plain text : /

To be more precise, i'm on releasenoteshtml.vm , slightly modifying the *.vm.

JIRA 8.4.1

Try to use it in

<html>

<head>
$webResourceManager.requireResource("com.atlassian.auiplugin:aui-select")
</head>

</html>

Keeps with the same problem.

In Velocity.properties.xml, cached is disabled

Also I've forced putting the <head> tags since the vm starts with:

#disable_html_escaping()

##Text is escaped twice so that the characters generated in the text area display properly escaped (JRA-12184)

###macro (doubleEncode $html)

## $textUtils.htmlEncode($textUtils.htmlEncode($html))

###end

<title>$textUtils.htmlEncode($action.getText('release.notes.html.title', $project, $version))</title>

<body>

The fact that there's a title tag in there with no head tags and then an opening body tag is rare to me. I've tried several combination, also what you mentioned and still nothing.

I believe this is created from releasenote.jsp located in secure/views/project

In Velocity.properties I see:

#----------------------------------------------------------------------------
# RESOURCE MANAGEMENT
#----------------------------------------------------------------------------
# Allows alternative ResourceManager and ResourceCache implementations
# to be plugged in.
#----------------------------------------------------------------------------

resource.manager.class = com.atlassian.velocity.PluginAwareResourceManager
resource.manager.cache.class = com.atlassian.velocity.PluginAwareResourceManager$Cache
resource.manager.defaultcache.size=0

Which is the functional way?

OR anyone has a working example in releasenotes-html.vm?

Including the plugin Custom Select List

But I'll leave it open since I dont consider it the Correct solution for using resources in vm templates, furthermore, the version of select2 that is using is the old one

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

302 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you