Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ gtt report --issue_columns=iid --issue_columns=title --issue_columns=time_userna

*Note: Available columns to choose from: `id`, `iid`, `title`, `project_id`,
`project_namespace`, `description`, `labels`, `milestone`, `assignee`, `author`,
`closed`, `updated_at`, `created_at`, `due_date`, `state`, `spent`, `total_spent`, `total_estimate`*
`closed`, `updated_at`, `created_at`, `closed_at`, `due_date`, `state`, `spent`, `total_spent`, `total_estimate`*

*You can also include columns that show the total time spent by a specific user
by following this convention: `time_username`*
Expand All @@ -412,7 +412,7 @@ gtt report --merge_request_columns=iid --merge_request_columns=title --merge_req

*Note: Available columns to choose from: `id`, `iid`, `title`, `project_id`,
`project_namespace`, `description`, `labels`, `milestone`, `assignee`, `author`,
`updated_at`, `created_at`, `state`, `spent`, `total_spent`, `total_estimate`*
`updated_at`, `created_at`, `closed_at`, `merged_at`, `state`, `spent`, `total_spent`, `total_estimate`*

*You can also include columns that show the total time spent by a specific user
by following this convention: `time_username`*
Expand Down
4 changes: 4 additions & 0 deletions src/models/issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ class issue extends hasTimes {
return this.data.due_date ? moment(this.data.due_date): null;
}

get closed_at() {
return this.data.closed_at ? moment(this.data.closed_at): null;
}

get total_spent() {
return this.stats ? this.config.toHumanReadable(this.stats.total_time_spent, this._type) : null;
}
Expand Down
9 changes: 9 additions & 0 deletions src/models/mergeRequest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const hasTimes = require('./hasTimes');
const moment = require('moment');

/**
* merge request model
Expand Down Expand Up @@ -75,6 +76,14 @@ class mergeRequest extends hasTimes {
return moment(this.data.created_at);
}

get merged_at() {
return this.data.merged_at ? moment(this.data.merged_at): null;
}

get closed_at() {
return this.data.closed_at ? moment(this.data.closed_at): "not closed"
}

get state() {
return this.data.state;
}
Expand Down