-
Notifications
You must be signed in to change notification settings - Fork 24
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
Map GitHub Labels to JIRA Issue Types #147
Comments
@adambkaplan There's already a default type that can be set in the config options (type='Story'), but I agree it would be helpful to have some mechanism for certain identified issues to be created as a different type. |
Users can make a label anything they want, so we'd have to be precise about what the mapping is supposed to be. Issue type schemes or the types themselves on the Jira side might change, which could confuse things too. Here's an example of what I propose adding to the config:
keys are labels, and values are issue types. You'll note that I'm a little against failing over to an issue type if a specified one is not available, I think that should be an error because moving issues is an expensive op on the Jira side. Issue types may have custom workflows and fields that will need to be reset when moving between types. What do you guys think? |
I like it. I wish that we had and could require the use of "scoped labels" for this, so that we can be sure that an issue does not receive both the bug and the enhancement label at the same time, in which case our behavior would be undefined. What should sync2jira do if an issue receives both a bug and an enhancement label? |
Also, what should the tool do if both bug and enhancement are removed? |
Isn't this the current state, with the default type is "Story"? If no match is found, I think teams would rather have upstream items in the backlog vs. not and stuck in an email (or worse, not present at all).
Agree this is a very likely scenario. If the issue types mapping is stored as an array, maybe the code just iterates and the first match wins? This behavior should be deterministic, and I don't foresee a huge performance penalty. My hunch is the the number of entries per project/repo will be small (less than 10).
Perhaps we only worry about issue type at the point of story creation? As @Zyzyx mentioned, changing the issue type can be an expensive operation, so I don't think sync2jira should move issue types. This also helps narrow the scope. |
Agree that syncing something seems more valuable than having some kind of interim un-synced triage state that could get overlooked, but I don't have as broad exposure to projects as some here probably to say how painful it could be to move and re-type the occasional issue. Could it apply a label or some kind of flag when syncing a potentially ambiguous issue to indicate that more triage may be necessary? Could also use that with a comment if the labels change later, rather than trying to automatically move it to the new type. If it becomes a large volume for a team, having an easy way to find those issues could make process conversations easier to try and mitigate it moving forward. |
Proposal 2 after this feedback. There are 2 options to consider for issue types.
If I further support Adam's position re: changing labels later on. I don't think Sync2Jira should try to migrate issue types. We could drop a comment in consolation. I'd treat changing types post-creation as a separate RFE, the error handling alone is going to be a lot. |
That sounds good. Let's try it. |
Overall, that sounds like a good starting point to me.
Would it be valuable to additionally apply some kind of 'sync2jira_triage' label in this situation? If there's just a comment, that helps in the moment, but I don't think I could easily find all similar issues in my project(s) with a query. |
Are you suggesting that sync2jira_triage be a label that identifies work items that had a non-critical error and a team should possibly take further actions? I could see that being valuable in broader use cases, but maybe a separate RFE? |
Yes. I filed #171 for that triage listing assistance. It could be useful here, but doesn't need to block this change if you want to keep scope small. |
Of note here, this may get simpler in the future. From looking at GH's public roadmap - github/roadmap#837 |
PR is ready |
Allow config options which map a label to an issue type in JIRA. For example, if a GitHub issue has the label
bug
, create a JIRA issue with theBug
type.This should be flexible per repository, as well as allow a fall-through default (ex: "Story") to be set.
The text was updated successfully, but these errors were encountered: