extract comment information from jira to eazybi report

Hi,

A report is requested in eazybi to include issue comments from JIRA this includes comments created under subtask.

What property and dimension can we use to capture issue comments from JIRA?

We would appreciate help in here.

Thanks.

1 answer

This widget could not be displayed.

Hi!

As issue comments as well as description usually is not used for reporting they are not imported by default.

Do you wish to import all comments text or just the count of comments per sub-task issue?

For now I can suggest to add JIRA Misc Custom field that would retrun Issue comments and then this custom field could be imported to eazyBI.

Please let me know if you need additional help with JIRA Misc custom field. You can contact me directly at support@eazybi.com.

Kind regards,
Lauma

Hi Lauma,

We intend to import all comments including comments of sub-tasks, would JIRA Misc Custom field be able to handle this requirement?

Thanks,

Hi Eric!

Yes, the following formula in JIRA MISC custom text field description would return Issue comments as well as Issue sub-task comments, if sub-tasks exist

<!-- @@Formula:
import org.apache.commons.lang.StringUtils;
import com.atlassian.jira.component.ComponentAccessor;

commentManager = ComponentAccessor.getCommentManager();

allComments = new ArrayList();

issueComments = commentManager.getComments(issue.getIssueObject());
if (issueComments != null) {
  for (comment : issueComments) {
    allComments.add(comment.getBody());
  }
}

subTasks = issue.getIssueObject().getSubTaskObjects();

if (subTasks != null) {
  for (subTask : subTasks) {
    subTaskComments = commentManager.getComments(subTask);
    if (subTaskComments != null) {
      for (subTaskComment : subTaskComments) {
        allComments.add(subTaskComment.getBody());
      }
    }
  }
}

if (allComments.isEmpty()) return null;
StringUtils.join(allComments, "\n");
-->

If you do not wish to see this custom field in JIRA Issue screen, then please configure to not show it in any of screens. It will still be possible to import comments as Issue proeperty in eazyBI.

To see this new calculated field in eazyBI custom field selection you would need to add following lines in eazyBI Advanced settings

[jira.customfield_NNNNN] 
data_type = "text"

where NNNNN is custom field number.

When advanced settings are saved go to Source Data tab and select to import the new custom field. After import you will be able to see comments when new measure is selected on columns and Issue dimension / Issue level on rows.

Please note that if you use Oracle database then maximum lenght of the custom text field can be 4000 symbols. If you have very long comments they might be cut to this lenght.

Let me know if you have additional questions!

Sorry to necro-bump this thread, but unfortunately, the JIRA Misc Custom field plugin isn't available for Cloud customers. Are there any plans for Cloud availability?

Hi Richard, I did answer to your e-mail as well. Shortly here as well - yes, for JIRA Cloud similar calculation can be done using JavaScript calculated custom fields. See more details here https://docs.eazybi.com/display/EAZYBIJIRA/JavaScript+calculated+custom+fields. Kind regards, Lauma / support@eazybi.com

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

290 views 5 0
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