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

2 votes
Accepted answer

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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,343 views 0 8
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