JIRA default field(Summary) that use CSS and JS web resource

Hi, in https://developer.atlassian.com/display/JIRADEV/Custom+Fields+that+use+CSS+or+JavaScript+Web+Resources+in+JIRA+5.0

it is possible to set JS and CSS for custom field, so I want to know if it is possible to set for JIRA default(Standard) field, like Summary field? thanks.

1 answer

1 accepted

Yes, as long as you can identify an object to hang the code off of. I done it for checkboxes and radio buttons to get them to go across a page instead of down a page.

Hi Norman, that is the question, how to identify an object to hang the code off of, do I need to define a new custom field type and hang the code on the new custom field's vm file?

I know how to hang code to a custom field with following code in atlassian-plugin.xml file, but how to do that for a default one?

<customfield-type key="clarityproject" name="${project.name}" class="Class Name">

		<description>Choose a Clarity Project from a search list of possible matches.</description>

		<resource type="velocity" name="view"
			location="templates/plugins/fields/view/view-basictext.vm" />
		<resource type="velocity" name="column-view"
			location="templates/plugins/fields/view/view-limited-text.vm" />
		<resource type="velocity" name="xml"
			location="templates/plugins/fields/xml/xml-basictext.vm" />
		<resource type="velocity" name="edit" 
			location="/edit-project-project.vm" />
</customfield-type>

Thanks.

You need to look at the generated source code page that the browser rendered. Then figure out what combination of ids, classes or tags you need to reach the object you want. It is hard to be more specific without an example.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Apr 19, 2018 in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

366 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you