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

When transitioning issues, it only finds the first partial match to the new transition state #281

Closed
pcockwell opened this issue Sep 30, 2019 · 0 comments

Comments

@pcockwell
Copy link
Contributor

pcockwell commented Sep 30, 2019

Assume there are 4 states for a ticket - To Do, In Progress, PR, and Done

When running jira transition PR PROJ-1234, per

func (t Transitions) Find(name string) *Transition {
name = strings.ToLower(name)
for _, trans := range t {
if strings.Contains(strings.ToLower(trans.Name), name) {
return trans
}
}
return nil
}
it will only search for the first potential match, which in this case will be In Progress because pr is contained within in progress.

It would be expected that if another state directly matches the submitted state, that it would prefer the direct match over the earlier partial match

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

1 participant