I am just starting on Greenhopper and we were going to try to just use the original estimates rather than work logging (to reduce overhead). What I was hoping was:
* set original estimate
* when closing ticket, GH sets remaining estimate to zero (this works)
* burndown chart shows the hours burned down.
Instead, burndown charts are flat. GH seems to log a dummy 1 minute work log. Do I need to tell the team to start logging work in detail, or is there a way to make this happen on close? Example:
Original Est: 4 hours
* drag to done
* Sets Remaining Est. to 0 hours
* Logs 4 hours work to make the burndown correct
If this isn't possible I would love guidance on how to log work efficiently without extra issue edits/etc.
You can create postfunction with functionality to add worklogs to Issue and add it to resolve transition.
Something similar to this:
public void execute(Map transientVars, Map args, PropertySet ps) throws FieldValidationException {
WorklogManager worklogManager = ComponentManager.getInstance().getWorklogManager();
WorkflowContext context = (WorkflowContext) transientVars.get("context");
String username = context.getCaller();
Issue issue = (Issue) transientVars.get("issue");
Worklog worklog;
Long timeSpent = issue.getEstimate();
Principal principal = ActionContext.getContext().getPrincipalImpl();
boolean dispatchEvent = false; //Set tot true if you need email notifications
if (timeSpent != null && timeSpent > 0 && principal != null && principal instanceof User) {
worklog = new WorklogImpl(worklogManager, issue, null, username, "Place Log Work Comment Here", new Date(),
null, null, timeSpent);
worklogManager.create((User) principal, worklog, 0L, dispatchEvent);
}
Moreover you can calculate how long issue was in specific state and log this time as worklog, you can even calculate only working hours between dates.
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.