You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/06/30 08:19:35 UTC

[GitHub] [incubator-devlake] mindlesscloud opened a new pull request, #2394: fix: convert story point to signed integer

mindlesscloud opened a new pull request, #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394

   # Summary
   
   fix #2380 [Bug][jira] 18446744073709551615 is greater than maximum value for Int8
   
   The type of column `std_story_point` was unsigned integer, the value returned from API was `-1`, converting `-1` to unsigned interger we got `18446744073709551615`. To fix this, we alter the type of column `std_story_point` to a signed integer.
   ### Does this close any open issues?
   close #2380 
   
   ### Screenshots
   Include any relevant screenshots here.
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mappjzc commented on a diff in pull request #2394: fix: convert story point to signed integer

Posted by GitBox <gi...@apache.org>.
mappjzc commented on code in PR #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394#discussion_r910858388


##########
models/domainlayer/ticket/issue.go:
##########
@@ -34,7 +34,7 @@ type Issue struct {
 	Type                    string `gorm:"type:varchar(100)"`
 	Status                  string `gorm:"type:varchar(100)"`
 	OriginalStatus          string `gorm:"type:varchar(100)"`
-	StoryPoint              uint
+	StoryPoint              int64

Review Comment:
   18446744073709551615 is 2^64 -1 ,but int64 is -2^63 to 2^63.
   Is int64 enough?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mindlesscloud merged pull request #2394: fix: convert story point to signed integer

Posted by GitBox <gi...@apache.org>.
mindlesscloud merged PR #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on a diff in pull request #2394: fix: convert story point to signed integer

Posted by GitBox <gi...@apache.org>.
klesh commented on code in PR #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394#discussion_r910856829


##########
plugins/jira/tasks/issue_extractor.go:
##########
@@ -100,10 +101,14 @@ func ExtractIssues(taskCtx core.SubTaskContext) error {
 				issue.LeadTimeMinutes = uint(issue.ResolutionDate.Unix()-issue.Created.Unix()) / 60
 			}
 			if data.Options.TransformationRules.StoryPointField != "" {
-				strStoryPoint := apiIssue.Fields.AllFields[data.Options.TransformationRules.StoryPointField].(string)
-				issue.StoryPoint, _ = strconv.ParseFloat(strStoryPoint, 32)
+				fmt.Println(apiIssue.Fields.AllFields[data.Options.TransformationRules.StoryPointField])

Review Comment:
   To be removed



##########
plugins/jira/tasks/issue_extractor.go:
##########
@@ -100,10 +101,14 @@ func ExtractIssues(taskCtx core.SubTaskContext) error {
 				issue.LeadTimeMinutes = uint(issue.ResolutionDate.Unix()-issue.Created.Unix()) / 60
 			}
 			if data.Options.TransformationRules.StoryPointField != "" {
-				strStoryPoint := apiIssue.Fields.AllFields[data.Options.TransformationRules.StoryPointField].(string)
-				issue.StoryPoint, _ = strconv.ParseFloat(strStoryPoint, 32)
+				fmt.Println(apiIssue.Fields.AllFields[data.Options.TransformationRules.StoryPointField])
+				fmt.Println(apiIssue.Fields.AllFields)

Review Comment:
   Same as above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] likyh commented on pull request #2394: fix: convert story point to signed integer

Posted by GitBox <gi...@apache.org>.
likyh commented on PR #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394#issuecomment-1170957882

   Maybe you can target to add some e2e tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #2394: fix: convert story point to signed integer

Posted by GitBox <gi...@apache.org>.
mindlesscloud commented on code in PR #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394#discussion_r910930059


##########
models/domainlayer/ticket/issue.go:
##########
@@ -34,7 +34,7 @@ type Issue struct {
 	Type                    string `gorm:"type:varchar(100)"`
 	Status                  string `gorm:"type:varchar(100)"`
 	OriginalStatus          string `gorm:"type:varchar(100)"`
-	StoryPoint              uint
+	StoryPoint              int64

Review Comment:
   the number returned from the API was `-1`. if we try to assign `-1` to an unsigned integer, we got  `18446744073709551615` which is a bug.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mindlesscloud commented on pull request #2394: fix: convert story point to signed integer

Posted by GitBox <gi...@apache.org>.
mindlesscloud commented on PR #2394:
URL: https://github.com/apache/incubator-devlake/pull/2394#issuecomment-1171022339

   > Maybe you can target to add some e2e tests.
   
   Good idea


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org