In Jira, Updated field indicated the time stamp when an issue was modified. I need to know who last modified/updated an issue. Which field indicates the user who last modified an issue?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.util.UserManager
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def changeItems = changeHistoryManager.getAllChangeItems(issue)
if (changeItems?.size() > 0) {
def userManager = ComponentAccessor.getUserManager() ;
def userkey = changeItems.sort(false).last().getUserKey();
userManager.getUserByKey(userkey);
} else {
null
}
Try that!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where does this code go? Sorry I am new to JIRA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is groovy code. In order to run this within Jira, you would need the Scriptrunner app. There might be other differing solution from other Marketplace vendors as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello there !
Thank you @Sagar Amlani your code worked successfully for me too ! :)
But it does not take into account the event "issue commented", only updates to the ticket.
If someone comments the ticket, the last updater will not change, if you understand what i mean.
How to implement the "issue commented" also please ?
Sylvain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is an exampled script using Powerscript.
Add post function to all transitions of workflow and do bulk transition.
JFieldChange [] changes = lastIssueChanges(key);
number i = size(changes) -1;
if (i >= 0){
string fullname = ldapUserRecord("displayName", "(sAMAccountName=" + changes[i].user + ")");
string lastupdatedby = changes[i].user;
if (fullname != ""){
lastupdatedby = fullname + " (" + lastupdatedby + ")";
}
customfield_39271 = lastupdatedby; //Last updated by
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can also use kepler custom fields to get the last comment information as well. https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.keplercf http://atlassian.techsolcom.ca/en/news/entry/improve-jira-dashboards-by-showing-the-last-issue-comment
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know how or where to use either of the script suggestions above. Can you provide more detail? Or, can someone suggest how to achieve this with Power BI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, JIRA does not have one. You can vote for these issues to attempt to get JIRA fixed.
https://jira.atlassian.com/browse/JRA-1973
https://jira.atlassian.com/browse/JRA-15235
You can use the changed or was operators on the assignee, fixed version, priority, reporter, resolution and status fields though.
status changed after -5d by George
There are some free and paid plugins to help with comments like
https://ecosystem.atlassian.net/wiki/display/JTOOL/JIRA+Toolkit+Plugin
https://marketplace.atlassian.com/plugins/com.primefieldsoftware.jira.essentialcustomfields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.