From 89206898bfeec24b6954bf07f30fb94456679f0a Mon Sep 17 00:00:00 2001 From: Benoit Verhaeghe Date: Mon, 29 Jul 2024 09:47:07 +0200 Subject: [PATCH] add timeEstimate --- .../JPMetamodelGenerator.class.st | 5 ++- src/JiraPharoAPI-Model/JPIssue.class.st | 33 +++++++++++++++++++ src/JiraPharoAPI/JiraPharoAPI.class.st | 8 +++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/JiraPharoAPI-Model-Generator/JPMetamodelGenerator.class.st b/src/JiraPharoAPI-Model-Generator/JPMetamodelGenerator.class.st index 7c6304a..25ca55d 100644 --- a/src/JiraPharoAPI-Model-Generator/JPMetamodelGenerator.class.st +++ b/src/JiraPharoAPI-Model-Generator/JPMetamodelGenerator.class.st @@ -54,6 +54,9 @@ JPMetamodelGenerator >> defineProperties [ issue property: #id type: #Number. issue property: #created type: #Object. issue property: #timespent type: #Object. + issue property: #timeEstimate type: #Object. + issue property: #timeOriginalEstimate type: #Object. + issue property: #timespent type: #Object. issue property: #labels type: #Object. issueType property: #id type: #Number. @@ -86,7 +89,7 @@ JPMetamodelGenerator >> defineProperties [ user property: #emailAddress type: #String. user property: #name type: #String. user property: #accountType type: #String. - user withEqualityCheckOn: { #accountId }. + user withEqualityCheckOn: { #accountId } ] { #category : 'definition' } diff --git a/src/JiraPharoAPI-Model/JPIssue.class.st b/src/JiraPharoAPI-Model/JPIssue.class.st index bc2f372..087372c 100644 --- a/src/JiraPharoAPI-Model/JPIssue.class.st +++ b/src/JiraPharoAPI-Model/JPIssue.class.st @@ -28,6 +28,9 @@ | `key` | `String` | nil | | | `labels` | `Object` | nil | | | `summary` | `String` | nil | | +| `timeEstimate` | `Object` | nil | | +| `timeOriginalEstimate` | `Object` | nil | | +| `timespent` | `Object` | nil | | | `timespent` | `Object` | nil | | " @@ -41,6 +44,8 @@ Class { '#id => FMProperty', '#created => FMProperty', '#timespent => FMProperty', + '#timeEstimate => FMProperty', + '#timeOriginalEstimate => FMProperty', '#labels => FMProperty', '#components => FMMany type: #JPComponent opposite: #issue', '#worklogs => FMMany type: #JPWorklog opposite: #issue', @@ -244,6 +249,34 @@ JPIssue >> summary: anObject [ summary := anObject ] +{ #category : 'accessing' } +JPIssue >> timeEstimate [ + + + + ^ timeEstimate +] + +{ #category : 'accessing' } +JPIssue >> timeEstimate: anObject [ + + timeEstimate := anObject +] + +{ #category : 'accessing' } +JPIssue >> timeOriginalEstimate [ + + + + ^ timeOriginalEstimate +] + +{ #category : 'accessing' } +JPIssue >> timeOriginalEstimate: anObject [ + + timeOriginalEstimate := anObject +] + { #category : 'accessing' } JPIssue >> timespent [ diff --git a/src/JiraPharoAPI/JiraPharoAPI.class.st b/src/JiraPharoAPI/JiraPharoAPI.class.st index d2e25b1..0b637f7 100644 --- a/src/JiraPharoAPI/JiraPharoAPI.class.st +++ b/src/JiraPharoAPI/JiraPharoAPI.class.st @@ -161,6 +161,14 @@ JiraPharoAPI >> configureReaderForJiraIssue: reader [ cmp at: #name ifPresent: [ :t | localComponent name: t ]. localComponent ]) ]. + value at: #timeestimate ifPresent: [ :timeestimate | + timeestimate ifNotNil: [ + pharoIssue timeEstimate: timeestimate seconds ] ]. + value + at: #timeoriginalestimate + ifPresent: [ :timeoriginalestimate | + timeoriginalestimate ifNotNil: [ + pharoIssue timeOriginalEstimate: timeoriginalestimate seconds ] ]. value at: #project ifPresent: [ :project |