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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Jira 7.6.1 add web panel

Hi all,

I try to add a web panel for a certain type of Project, but not find the built-in script to do this.

My own need is to display a message on Details section of issue screen. If not possible, to create a new "section" (web-panel) to display the message, according to value of certain custom fields.

this page https://scriptrunner.adaptavist.com/latest/jira/fragments/WebPanel.html speak about "Show a web panel built-in script", but I didn't find any options / config on Project or Issue ... :(

Moreover, in another project, I see this kind of section (below "Dates" section, a message with colored background). But I didn't find any option (script-runner built-in script, post function built-in script ...)

 

in a post function script (which create a new issue), I add this kind of code :

 

import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.RendererManager

def issue = context.issue as Issue

def rendererManager = ComponentAccessor.getComponent(RendererManager)
def fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem("description")
def renderer = rendererManager.getRendererForField(fieldLayoutItem)

if (issue.isSubTask() && issue.parentObject.description) {
    writer.write(renderer.render("this is a test", null))
}

 I suppose this kind of code should show the description of parent issue on "description" section of current issue, so, I adapt it to show "this is a test". Unfortunately, this not work.

 

How I can easyly do that ?

 

thanks in advance

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Share your Confluence Cloud experience for a chance to win $500!

Take our 5-minute survey to win a $500 Visa gift card! Are you currently using Confluence Cloud? We want to hear from you! Fill out this quick survey about your Confluence Cloud experience so we ...

75 views 1 4
Read article

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