A little script to help the life better. This script is a Listener which update the summary of JIRA issue to add assignee info. I'm using JIRA Agile and its board doesn't show the assignee name so I create this script to display it in the summary field.
Code as following, save it with .groovy extension and then put it into atlassian-jira/WEB-INF/classes/com/xxx/listeners and then configure JIRA to use com.xxx.listeners.UpdateAssigneeSummaryListener as class
import com.atlassian.jira.event.issue.AbstractIssueEventListener;
import com.atlassian.jira.event.issue.IssueEvent;
import org.apache.log4j.Category;
import com.atlassian.jira.event.type.EventType;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.user.util.UserManager;
import com.atlassian.jira.event.type.EventDispatchOption;
import com.atlassian.jira.component.ComponentAccessor;
class UpdateAssigneeSummaryListener extends AbstractIssueEventListener {
Category log = Category.getInstance(UpdateAssigneeSummaryListener.class)
@Override
void workflowEvent(IssueEvent event) {
Issue issue = event.getIssue();
Long eventTypeId = event.getEventTypeId();
if ((eventTypeId.equals(EventType.ISSUE_ASSIGNED_ID) || eventTypeId.equals(EventType.ISSUE_CREATED_ID)) && issue.getResolutionDate() == null)
{
def test = (issue.getSummary() =~ /^\[([A-Za-z]+)\]/)
def summary
def assignee = issue.getAssigneeId()
if (test.getCount() != 0)
{
// Replace the user in bracket.
summary = (issue.getSummary() =~ /\[([A-Za-z]+)\]/).replaceFirst("[${assignee}]")
}
else
{
summary = "[${assignee}] ${issue.getSummary()}"
}
MutableIssue mutableIssue = (MutableIssue)issue;
mutableIssue.setSummary(summary);
IssueManager issueManager = ComponentAccessor.getIssueManager();
UserManager userManager = ComponentAccessor.getUserManager();
issueManager.updateIssue(event.getUser(), mutableIssue, EventDispatchOption.DO_NOT_DISPATCH, false)
}
}
}
Nov 8, 2013
Oct 22, 2013
Should we move to KVM?
The virtualization wars between VMWare and KVM is not over. KVM is recently adapted by many companies such as IBM,.
Should we migrate to KVM? It's free/low cost than VMWare but show better results than VMWare...Hmmm....
http://openvirtualizationalliance.org/blog
ftp://public.dhe.ibm.com/linux/pdfs/Clabby_Analytics_-_VMware_v_KVM.pdf
http://www.scalecomputing.com/files/documentation/whitepaper-vmware-vs-scale-computing.pdf
Should we migrate to KVM? It's free/low cost than VMWare but show better results than VMWare...Hmmm....
http://openvirtualizationalliance.org/blog
ftp://public.dhe.ibm.com/linux/pdfs/Clabby_Analytics_-_VMware_v_KVM.pdf
http://www.scalecomputing.com/files/documentation/whitepaper-vmware-vs-scale-computing.pdf
Sep 3, 2013
Aug 27, 2013
Aug 19, 2013
How to fake the LSB release
On Fedora, edit the /etc/redhat-release as following
[hieult@hieuletrung ti-sdk-am335x-evm-06.00.00.00]$ cat /etc/redhat-release
Ubuntu 10.04 release 10.04 (lucid)
Then install the lsb_release package
On Ubuntu, edit the /etc/lsb-release as following
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu lucid (development branch)"
[hieult@hieuletrung ti-sdk-am335x-evm-06.00.00.00]$ cat /etc/redhat-release
Ubuntu 10.04 release 10.04 (lucid)
Then install the lsb_release package
On Ubuntu, edit the /etc/lsb-release as following
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu lucid (development branch)"
Aug 18, 2013
Add icon to new GNOME desktop toolbar (FC16)
Alt+Right Click to add icon to Gnome toolbar in new Gnome desktop version
Subscribe to:
Posts (Atom)