Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I display information in an issue that is not inputted by a user?

ETC TPM September 23, 2020

I'm trying to get issues to display the number of times they have been edited, however I can't find a way to do this without allowing the user to input that number in a screen. How do I display information on an issue that the user has not inputted (i.e. a script keeps track of every time an issue is edited)

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

There's a couple of approaches to this, but they all need a bit of code.

One approach is to

  • Create a custom field to hold the counter
  • Put the field on the issue view screen, but not the create, edit or any transition screens
  • Write a listener to pick up all changes to an issue that you want to count as an edit (remember "issue updated" will be there for edits, but do you want to count status change, comment etc as well?)

A more simple approach, assuming you have an app that provides the function:

  • Write a scripted field that reads the issue history and counts up all changes you want to include.  Scripted fields are not user-editable, so you don't need to think about screen usage
ETC TPM September 23, 2020

Thanks for your quick response! I have written a calculated number field that (I hope) counts issue edits; how would i get it to display on an issue without assigning it to a screen?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

You do not.  You have to put it on the view screen

ETC TPM September 24, 2020

The field is on the view screen but nowhere else. I've checked that the code it uses runs, but the field is still not displayed on preexisting or newly created issues. What might I be doing wrong?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2020

If the field is on the view screen, but does not appear, then it is not populated.  You'll need to check your code to see why it is not saving the calculation.

Suggest an answer

Log in or Sign up to answer