I am looking for help using Automation for JIRA to copy the author from the last ticket comment into a custom (user Picker) field, when a ticket is commented on.
As shown below in the screenshot. (In this instance, I manually edited the field)
The reason is, I would like to be able to setup a JQL filter, to filter the last comment author against the tickets assignee.
I have setup the custom field 'Last Commented User' customFieldId=10603
and the Automation for JIRA rule looks like this.
The rule failed error messages look like this.
Can anyone provide any advice?
F.Y.I, we are running the below (server) versions ...
JIRA Service Desk 3.16.0
Jira Software 7.13.0
Jira Core 7.13.0
Automation for Jira 7.2.3
Have you already solved this question? If not, I wondered about two things:
Thank you very much for the reply and advice.
No I have not managed to get this working yet ...
I am fairly sure I have the correct field ID, see image below.
Regarding editing the JSON, well I guess this is where I really need the help.
The JSON I was using i cobbled together from various forum posts with the similar problem, as well the Atlassian Smart Value guides like the one you linked.
I have edited the JSON as below...
However I still get the same error message ...
You said in your post "set the custom user field to the last commentor".
I suppose that is where I get stuck. How do I do that?
Thanks in advance.
You appear to be setting a user field with just the display name. Have you tried to set the last commentor's user to the custom field? And, check that comments is plural for the smart value.
Thanks for your help with this problem.
Using information from this post and ...
... I have been able to solve the issue.
Once again, thanks for your help :)
I have created a CustomField "Latest Comment By" of "User picker (single user)" type and am trying to populate it using an Automation rule at "Issue commented" event
Can you share the script, if possible...
Additionally, I am also trying to populate Latest Comment Date, but am still working on it (Field type, etc.)...
Thanks and regards,
Hi @Ashraf B
Please try by accessing the value for your custom field, such as the following (filling in your own custom field name):
Smart values for custom fields are not always obvious, so if you cannot get it to work please the information in this how-to article to identify your custom field's smart value:
For the last comment added date, please try this: