Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing fields in FixVersion struct #208

Closed
urld opened this issue Apr 28, 2019 · 2 comments
Closed

Missing fields in FixVersion struct #208

urld opened this issue Apr 28, 2019 · 2 comments

Comments

@urld
Copy link
Contributor

urld commented Apr 28, 2019

Is there any reason the fields of the struct representing a fixVersion of an issue, do not match the fields of the struct representing a projects version?

// FixVersion represents a software release in which an issue is fixed.
type FixVersion struct {
	Archived        *bool  `json:"archived,omitempty" structs:"archived,omitempty"`
	ID              string `json:"id,omitempty" structs:"id,omitempty"`
	Name            string `json:"name,omitempty" structs:"name,omitempty"`
	ProjectID       int    `json:"projectId,omitempty" structs:"projectId,omitempty"`
	ReleaseDate     string `json:"releaseDate,omitempty" structs:"releaseDate,omitempty"`
	Released        *bool  `json:"released,omitempty" structs:"released,omitempty"`
	Self            string `json:"self,omitempty" structs:"self,omitempty"`
	UserReleaseDate string `json:"userReleaseDate,omitempty" structs:"userReleaseDate,omitempty"`
}
// Version represents a single release version of a project
type Version struct {
	Self            string `json:"self,omitempty" structs:"self,omitempty"`
	ID              string `json:"id,omitempty" structs:"id,omitempty"`
	Name            string `json:"name,omitempty" structs:"name,omitempty"`
	Description     string `json:"description,omitempty" structs:"name,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
	StartDate       string `json:"startDate,omitempty" structs:"startDate,omitempty"`
}

I can live with the bool pointer weirdness, but i'd really like to access the versions description directly from the issue.
If this is just an oversight, i could send a pull request adding the missing fields to .

@urld
Copy link
Contributor Author

urld commented Apr 28, 2019

Pull Request #181 seems to be related to my problem, but has not seen activity in a while, and seems to break the API (which could be avoided easily).

@ghostsquad
Copy link
Contributor

@urld I asked for a small change in the PR to maintain backward compatibility. It seems the PR author may have abandoned the issue, not sure. If you want to submit a backward compatible PR, I'd be happy to merge it and close the other one.

urld added a commit to urld/go-jira that referenced this issue Apr 28, 2019
The FixVersion type was missing some fields. Now it just aliases the
more complete Version struct.

Fixes andygrunwald#208
urld added a commit to urld/go-jira that referenced this issue Apr 28, 2019
The FixVersion type was missing some fields. Now it just aliases the
more complete Version struct.

Fixes andygrunwald#208
urld added a commit to urld/go-jira that referenced this issue Apr 28, 2019
The FixVersion type was missing some fields. Now it is a complete copy
of the more complete Version struct, with the only difference thet the
bool fields are pointers (for compatibility reasons).

Fixes andygrunwald#208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants