- changed status to resolved
Add ID to WorklogEntryElement
Issue #609
resolved
When using the Jira Timesheet plugin for RAW json, it's sometimes helpful to get the workflow ID from the RESTful Endpoint so you can make changes to the particular entry. If this isn't included, then it's a bit of a workaround to actually discover the ID.
Easy fix is to change the WorklogEntryElement class to include an ID field like so:
public class WorklogEntryElement {
@XmlElement public Long id;
@XmlElement public String comment;
@XmlElement public Long timeSpent;
@XmlElement public String author;
@XmlElement public String authorFullName;
@XmlElement public Date created;
@XmlElement public String groupLevel;
@XmlElement public Date startDate;
@XmlElement public String updateAuthor;
@XmlElement public String updateAuthorFullName;
@XmlElement public Date updated;
// Required by JAXB
@SuppressWarnings("unused")
private WorklogEntryElement() {
}
public WorklogEntryElement(Worklog worklog) {
this.id = worklog.getId();
this.author = worklog.getAuthor();
this.authorFullName = worklog.getAuthorFullName();
this.created = worklog.getCreated();
this.groupLevel = worklog.getGroupLevel();
this.comment = worklog.getComment();
this.startDate = worklog.getStartDate();
this.updateAuthor = worklog.getUpdateAuthor();
this.updateAuthorFullName = worklog.getUpdateAuthorFullName();
this.timeSpent = worklog.getTimeSpent();
this.updated = worklog.getUpdated();
}
}
Comments (6)
-
-
Version 2.8.3 is available with the fix.
-
reporter Awesome! Thank you
-
Not at all :) This was obviously missing, thank you for letting me know!
-
- removed version
Removing version: 2.8 (automated comment)
-
- removed component
Removing component: Time Reports (automated comment)
- Log in to comment
fix issue
#609: add worklog id→ <<cset 13cbfbea81af>>