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

This widget could not be displayed.

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
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

172 views 1 3
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