Show subtask with numbers on view issue screen

Aleš Laňar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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

0 votes
Answer accepted
Jose M.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2014
Have you already checked the settings on the administration section, as from my head in the advanced section?
Aleš Laňar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2014

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

Jose M.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2014

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

Aleš Laňar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2014

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

0 votes
codelab expert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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

0 votes
Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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;

Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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;

Aleš Laňar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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 :)

Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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.

Aleš Laňar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2014

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?

0 votes
Adrian Moerchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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 ;)

Aleš Laňar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

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

Suggest an answer

Log in or Sign up to answer