Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,733
Community Members
 
Community Events
177
Community Groups

Adding custom javascript to issue collector?

Edited

I have been struggling with this, however I think I have a workable solution... however it is not the prettiest thing.

I am wanting to hide the User's Name and Email address fields, as I am populating this from the confluence page automatically.  Using the Fragment locator tool, I discovered that the custom template for an issue collector has:
Panel: wikiRendererWebPanel

I can add a "Show web panel" and add some javascript:

writer.write("""
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".contact-form-fields.field-group").hide();
});
</script>
""")

 

And this WORKS!  However due to a Jira bug, custom issue collector templates no longer work using an iframe in chrome:
https://jira.atlassian.com/browse/JRASERVER-73212
However, when you use the other templates (Got Feedbag? or Raise a bug), 
Panel: wikiRendererWebPanel no longer exists on the page.
So I have two questions...

Is there a better way to do this?  I think you can actually edit the template files on the server but I would rather have a scripted/scriptRunner way if possible.

And second question:
Is there a way to use a condition statement on an issue collector page?  I would like to restrict the code to running on a specific issue collector... however I have no idea how to do this.  I know the snippet shows:
jiraHelper.project?.key == "JRA"

But this didnt seem to work for restricting it to my project key with an issue collector.  I am not sure if I can verify the collector ID or do something else there?  Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events