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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

25 views 0 4
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