-
Notifications
You must be signed in to change notification settings - Fork 26
Allow disabling syncing whiteboard fields to Jira. Fixes #201 #206
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
Conversation
grahamalama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments before I do a full review:
- can we add a description to the PR?
- In another comment above, you said:
... It has turned out though that we've decided for our project to just not store the labels at all so I could change this setting to a simple boolean to turn it off if that is preferable.
If no projects are using this setting, is it still worth merging this change? Are JBI users surprised by or not happy with the behavior as it currently is?
- If this is something we still want to change, have we considered an approach where we merge the labels? So essentially appending the Bugzilla whiteboard tags to the Jira issue rather than overwriting them?
Done
The previous version of the PR allowed both disabling syncing or syncing to a different field in Jira. I had thought we were going to do the latter but it turns out we just don't want the labels synced at all so we still want that functionality. I should probably add it to the config for our project as part of this...
Merging in the generic case has some challenges. You would need to retrieve the existing labels from Jira and attempt to determine which were set from Bugzilla previously. At least for private bugs the webhook request doesn't include the old value of the status whiteboard when it changes so that would involve querying the bug's history to figure that out. Then you can identify the Jira only labels and add them to the new Bug labels. There are some ways to avoid that complexity, you could use some kind of per-project whitelist of labels to retain for instance. But either way you have a non-atomic update of the Jira fields that could still cause you to blow away fields set in between retrieving the old labels and setting the new. Given that for our project we aren't interested in having the bug labels in Jira it seems a lot simpler to just be able to disable them. |
For projects that make use of the Jira labels field JBI currently overwrites those labels everytime the synced bug changes. This allows disabling the syncing of the whiteboard fields.