Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Updating Fields

Ben Mottram April 29, 2021

I have recently created a new custom field in order to show the last time an issue was commented on.

However, I have seen it is only working with comments that have been made since I created the field.

Is there anyway I can get it to update the field for all tickets within a project?

3 answers

1 accepted

0 votes
Answer accepted
Ben Mottram May 4, 2021

I think what I'll have to do is set the field to be a Context Field, and then go manually through each ticket and set the date accordingly. Won't be fun but I'll only have to do it once!

Thanks for all your help. :)

0 votes
Peter Bengov
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.
April 29, 2021

Hi @Ben Mottram 

You have to configure the field to get updated by an app. 

For example, automation rules can be created when an issue field was changed and/or an issue transitioned/commented etc. That could be a good starting point for you.  

Ben Mottram April 29, 2021

Hi @Peter Bengov 

I created an automation rule to update the field when a support agent comment is added to a ticket (see attached picture). 

If I add a comment to a ticket, the field will update without issue.

But we have lots of tickets that haven't been updated since the field was created (and therefore, the field shows as blank for those tickets), and I'm looking to find if there is a way the system can scan those tickets for the last support comment and then update the field accordingly.

JIRA Last Support Comment rule.PNG

Peter Bengov
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.
May 4, 2021

Like Ben suggested, a bulk-manual work can be done for those older tickets since in Cloud there is no database hack you can run, unlike in the Server/Data Center solution. 

0 votes
Heather Ronnebeck
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2021

How did you configure the field? Was it done using a plug-in like Scriptrunner?

Ben Mottram April 29, 2021

Hi @Heather Ronnebeck 

I didn't use any plug-ins - I created a custom Date Picker field (see first picture), and then created an automation rule using the settings in the second picture to update the field when somebody who isn't a customer adds a comment.

It's working fine for any comments added now. What I'm looking to do, if possible, is for the system to scan through all tickets in the project and update the field - rather than simply the ones that have been updated since the field was set up.

DatePicker.PNG
JIRA Last Support Comment rule.PNG

Heather Ronnebeck
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2021

That's a cool way of doing it. Unfortunately, most custom fields only work from the moment they are added to tickets and onward. You might be able to do something against the DB itself through the backend to update it. 

Or if you have some development skills you could create a script and use JIRA's API to do something. 

A third option is if you have Structure they have a built in field to auto update the tickets. You can create an effector that runs through all of the tickets and updates the date of the last comment into the field you created that way. 

Ben Mottram May 4, 2021

I think what I'll have to do is set the field to be a Context Field, and then go manually through each ticket and set the date accordingly. Won't be fun but I'll only have to do it once!

Thanks for all your help. :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events