Show subtask with numbers on view issue screen

Hi there,

We need to show a numbers of subtasks on view issue screen. Can you help me with that?

I was try to look for view issue template, but there are only few very short templates.

Many thanks for any advice and help!

EDIT:

I am sorry for bad explaining... I mean that I need to view issue and on the part with subtask showing their numbers (IDs). Not their count :)

4 answers

1 accepted

Have you already checked the settings on the administration section, as from my head in the advanced section?

I am looked for that there, but there werent it.

We adapted under advanced settings, the view
jira.table.cols.subtasks
The columns to show when viewing sub-task issues in a table

Now it looks like
issuekey, issuetype, resolution, assignee, progress

OMG OMG OMG :-D I am really blind!!! How I couldnt see it!!!! Many thanks!

You can:

  1. Create a web panel for the issue view,
  2. Which calculates the number of subttasks for the current issue somehow (maybe Issue.html#getSubTaskObjects().size())
  3. And prints it ;)

I am sorry, my mystake. I mean showing numbers (IDs) of subtask on parent view page. I add it to question.

you can create a scripted field using script runner https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+Fields

select the number field as a template

and implement the code like:

if (null != issue.getSubTaskObjects())
  return issue.getSubTaskObjects().size();
return 0;

The same - but the template will be string and little bit more coding

String result = "";
if (null != issue.getSubTaskObjects() {
  for (def subIssue : issue.getSubTaskObjects() {
    result += subIssue.getId().toString() + "\n";
}
return result;

Thank you Alexey. It works. But this will create a new field, isnt it? Do you know how I can modify classic view? I uploading screen what I mean and what I want :)

Only through modification of sources. Please modify \atlassian-jira\WEB-INF\classes\templates\plugins\issueviews\single-word.vm

(look for issue.field.subtasks text inside that file). Please note that this modification should be applied each time you upgrade jira.

I am trying do that via this template, but it not work for me :( I try to modify it but no change. I try to delete this file (i have test instance) and nothing...everything work. Can you help me how i can check which templates is used?

The developers of "Essential Custom Fields for JIRA" are working on that required custom field. Within the next 2 days a new release will be published. https://marketplace.atlassian.com/1211807

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,329 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot