Bar comparison for wrong issues creation

Hi there,
I am a beginner on EazyBI and I want to develop a bar comparison for some issues:
The first one is a comparison between all the issues created without component (I mean only when the issue is created, even if we add a component in a second time, the bar comparison still counts the issue submit without component at the beginning)
I need the same for a comparison between all issues created and issues created without reporter at the beginning, and for a comparison between all issues created and issues created without due date at the beginning.
Furthermore, I want to make a table to show the reporters who create their issues without description (I saw you could it on EazyBI 7.0 but I work on 6.6.0)
I hope my description is clear and that you can help me.
Thank you!

Hi @q_christophe ,
You can create a JavaScript-calculated field for this type of logic. You need to iterate through issue history entries and return 1 when the required requirements are met. Here is an example of the counter for the component field. This code works for Jira Cloud. It returns 1:

  • If there is no value for the field component and there are no changes to the issue
  • Else, if there is a value for the component field, then it iterates through the issue history and returns 1 if the value has changed from an empty value
if (issue.changelog.histories.length === 0 &&
    issue.fields.components.length === 0) {
  return 1;
} else if (issue.fields.components.length > 0) {
  for (var i = 0; i < issue.changelog.histories.length; i++) {
    for (var j = 0; j < issue.changelog.histories[i].items.length; j++) {
      if (issue.changelog.histories[i].items[j].fieldId === "components" &&
          issue.changelog.histories[i].items[j].fromString === null) {
        return 1;
      }
    }
  }
}

Those are the parameters for the field:

Similarly, you can adjust the code so it meets your other requirements.

Kindly,
Gerda // support@eazybi.com

Hi @gerda.grantina,
I find how to import the code, but it doesn’t work in Eazy BI. I’m not working on Jira Cloud, could it be the problem ? Thank you.

Hello @q_christophe ,
I was testing this code on eazyBI Cloud. Please write directly to support@eazybi.com and share your Jira site, eazyBI account name, and reference to this conversation. This will enable me to investigate and address the solution within your account.

best,

Gerda // support@eazybi.com