Show and store reporter metric on JIRA Issues

I'm trying to develop a plugin for showing and reporting reporter metrics on JIRA issues. For example, with the metric called "number of reported issues", I'd like to do the following:

- Show the "number of reported issues" for a reporter on every issue.

- Update the "number of reported issues" value when a user reports an issue.

Like that, I have several other metrics. I was reading and doing some tutorials regarding Custom Fields, but they seem to be  at the level of issue. Is there something similar for users?


1 answer

1 accepted

1 vote
Accepted answer

The data you are trying to display is global, but you want to see it within the context of an issue, which is why you've ended up looking at fields.

  I'd stay away from issue fields because although you could write a field that would hold the number, it's not an issue field.

I would write a new panel for the issue view screen myself, one that can display anything you want.  Within that, you should be able to fetch the user you want from the reporter field on the issue, and then run some JQL like "reporter = x" and fetch just the size of the results for display.

There is a caveat on that trick - it requires the current user to be able to see all the reported issues.  If you don't have "global read", it's only going to report the number that the user can see.  If you want it to count everything, you'll have to run the code as a priviliged user who can see everything, or think about creating storage for the data that can be updated on every issue create/update.  (An issue for each user to hold the field maybe, or an active object for each user)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,884 views 19 22
Read article

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