In this post we want to show how to change some parts of the web panels of the Jira Issue View context. We can start changing the default global settings of Jira (in the Advanced section).

We can change the jira.table.cols.subtasks variable to add more fields to the web panel, also with the variable jira.view.issue.links.sort.order we can change the fields sort order.

Captura de pantalla 2019-06-23 a las 12.56.12

 

The result is something like this:

Captura de pantalla 2019-06-23 a las 13.10.17

We can try to add a new feature to all Subtask. We can include the parent issue description inside a new Panel in the subtasks! It’s very easy using Adaptavist Scriptrunner plugin. Just create a new Script Fragment (type: Show a web panel).

Captura de pantalla 2019-06-23 a las 13.03.02

Name it “Show parent description panel in all subtasks” (or something like that)

Captura de pantalla 2019-06-23 a las 13.02.50

Now insert values like this:

  • Location: alt.jira.view.issue.left.context
  • Key: parent-web-panel
  • Menu text: Parent ticket description
  • Wight: 500 ( is the position/order of the panel in the Issue View Context )
  • Condition: issue.isSubTask()

Captura de pantalla 2019-06-23 a las 13.03.29

Script:


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import 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(issue.parentObject.description, null))
}

The result is this:

Captura de pantalla 2019-06-23 a las 13.10.35

By MrAddon

Posted by:.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s