mozilla / jira-bugzilla-integration

Jira Bugzilla Integration (JBI) - system to sync bugs and issues
Mozilla Public License 2.0
9 stars 21 forks source link

Link created JIRA tickets to the "right" epic #250

Open gijsk opened 2 years ago

gijsk commented 2 years ago

To ensure we track tickets on a per-project basis we link them to epics in JIRA, and use whiteboard tags and/or metabugs in bugzilla.

When the bot files a JIRA ticket it would be nice if it got linked to the correct epic automatically, rather than having to do this manually after the fact.

Right now we have bugzilla metabugs, and attempt to use bugzilla whiteboard tags that are unique, on a per project basis. We aren't 100% consistent with the whiteboard tags, admittedly - I can see both [fidefe-2022-mr1-firefox-view] and [fidefe-firefox-view] in use, and there may be other variations.

It's not clear to me what would be the best way to automate this. I would want to avoid having to map whiteboard tags to JIRA epics in the source code as this would necessitate JBI deploys every time we used a new epic / whiteboard tag.

Perhaps we can look at metabugs and assign to epics based on that? We'd want to basically walk up the "blocks" chain of bugzilla bugs until we found one with an epic as the linked JIRA ticket. But I don't know if that's a reasonable solution or if we'd need something else.

jchaupitre commented 1 year ago

It is possible to build an Automation Rule in JIRA to listen to changes to the Label (Synced from whiteboard tag by JBI), and move new JIRA tickets under a given EPIC if the label match a whitelist we configured. Here's an example of such rule I built as a test https://mozilla-hub.atlassian.net/jira/software/c/projects/FIDEFE/settings/automate#/rule/9158923/audit-log