mirror of
				https://github.com/interviewstreet/go-jira.git
				synced 2025-10-30 23:47:46 +02:00 
			
		
		
		
	Fixed bool type for release version
This commit is contained in:
		| @@ -1739,8 +1739,8 @@ func TestIssueService_Get_Fields_AffectsVersions(t *testing.T) { | ||||
| 			Name:        "2.1.0-rc3", | ||||
| 			Self:        "http://www.example.com/jira/rest/api/2/version/10705", | ||||
| 			ReleaseDate: "2018-09-30", | ||||
| 			Released:    false, | ||||
| 			Archived:    false, | ||||
| 			Released:    Bool(false), | ||||
| 			Archived:    Bool(false), | ||||
| 			Description: "test description", | ||||
| 		}, | ||||
| 	}) { | ||||
|   | ||||
							
								
								
									
										9
									
								
								types.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								types.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| package jira | ||||
|  | ||||
| // Bool is a helper routine that allocates a new bool value | ||||
| // to store v and returns a pointer to it. | ||||
| func Bool(v bool) *bool { | ||||
| 	p := new(bool) | ||||
| 	*p = v | ||||
| 	return p | ||||
| } | ||||
| @@ -20,8 +20,8 @@ type Version struct { | ||||
| 	ID              string `json:"id,omitempty" structs:"id,omitempty"` | ||||
| 	Name            string `json:"name,omitempty" structs:"name,omitempty"` | ||||
| 	Description     string `json:"description,omitempty" structs:"description,omitempty"` | ||||
| 	Archived        bool   `json:"archived,omitempty" structs:"archived,omitempty"` | ||||
| 	Released        bool   `json:"released,omitempty" structs:"released,omitempty"` | ||||
| 	Archived        *bool  `json:"archived,omitempty" structs:"archived,omitempty"` | ||||
| 	Released        *bool  `json:"released,omitempty" structs:"released,omitempty"` | ||||
| 	ReleaseDate     string `json:"releaseDate,omitempty" structs:"releaseDate,omitempty"` | ||||
| 	UserReleaseDate string `json:"userReleaseDate,omitempty" structs:"userReleaseDate,omitempty"` | ||||
| 	ProjectID       int    `json:"projectId,omitempty" structs:"projectId,omitempty"` // Unlike other IDs, this is returned as a number | ||||
|   | ||||
| @@ -61,7 +61,8 @@ func TestVersionService_Create(t *testing.T) { | ||||
| 		Name:            "New Version 1", | ||||
| 		Description:     "An excellent version", | ||||
| 		ProjectID:       10000, | ||||
| 		Released:        true, | ||||
| 		Released:        Bool(true), | ||||
| 		Archived:        Bool(false), | ||||
| 		ReleaseDate:     "2010-07-06", | ||||
| 		UserReleaseDate: "6/Jul/2010", | ||||
| 		StartDate:       "2018-07-01", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user