-
Notifications
You must be signed in to change notification settings - Fork 556
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
Set component id if a numeric component is available in the component… #4008
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -686,8 +686,14 @@ def save(self, new_comment=None, notify=True): | |
# Make sure self.labels contains only hotlist IDs. | ||
self._filter_labels() | ||
|
||
if self.component_id: | ||
self._data['issueState']['componentId'] = int(self.component_id) | ||
# Best effort setting on componentId from list of components. | ||
# Set the componentId to the first encountered numeric component | ||
# in the component list. | ||
for component in list(self.components): | ||
if component.isnumeric(): | ||
self._data['issueState']['componentId'] = int(component) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to this it will set the first component that predator returns. It would be worth looking in logs for components in predator responses to see what is being returned. Maybe the first is not what we want, but it is likely impossible to say what we want. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Though as mentioned in b/341800538#comment8 the PEEPs bot is probably setting things to the 1st component anyway (would be good to verify what actually happens). |
||
break | ||
|
||
ccs = list(self._ccs) | ||
if ccs: | ||
self._data['issueState']['ccs'] = _make_users(ccs) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,7 +366,7 @@ def test_new_issue_with_component_tags(self): | |
body={ | ||
'issueState': { | ||
'componentId': | ||
1337, | ||
1456567, | ||
'ccs': [{ | ||
'emailAddress': '[email protected]' | ||
}], | ||
|
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.
hmmm...will component ever be an int? this will fail in that case.
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.
It will not be an int, we are doing the same thing a few lines above:
clusterfuzz/src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py
Line 665 in 22e1108