Bug 941309

Summary: zypper lp --issues=bugzilla is incomplete
Product: [openSUSE] openSUSE Tumbleweed Reporter: Michael Andres <ma>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: fcastelli
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Michael Andres 2015-08-11 14:30:04 UTC
> zypper lp --issues
lists more bugzilla issues than
> zypper lp --issues=bugzilla

'--issues=cve' seems to be ok...
Comment 1 Michael Andres 2015-08-14 07:39:40 UTC
a) 
>    --bugzilla[=#]         List needed patches for Bugzilla issues.
>    --cve[=#]              List needed patches for CVE issues.

Those are ok for me. 
These options explicitly filter for a patches _issueType_.


b)
>    --issues[=string]      Look for issues matching the specified string.

This one seems broken. 

NOTE: In fact '--bugzilla' is _not_the_same_ as '--issues=bugzilla':

  '--issues' is the result of _string_matches_
  '--bugzilla' tests for the _issues_type_

I.e. a patch with issueType==cve could match '--issues=bugzilla' if the string 'bugzilla' occurs somewhere in it's description or summary.

Nevertheless, the --issue results are suspoicious..
Comment 2 Michael Andres 2015-08-14 08:44:05 UTC
A few tescases later...
>  IssueType  IssueId
>  --------------------------
>  bugzilla = '916857'
>  bugzilla = '916856'
>  cve      = 'CVE-2014-9663'
>  cve      = 'CVE-2014-9662'

That's the explanation:

'--issues=cve' finds (string)matches within the Issue_Id_s, 
while 'bugzilla'-Ids only contain numbers.

Similar for matches in the patch description: 'cve' has matches as the IssueId occurs in the description. But no matches for 'bugzilla' because the description contains just "bnc#916857' or 'boo#916856' but not 'bugzilla".



So the result is actually correct, but quite confusing. 

I'll extend '--issues=' to look for matches in the IssueType-string as well. This way '--issues=bugzilla' will be similar to '--bugzilla' (but it's still a different kind of query).
Comment 3 Michael Andres 2015-08-14 10:07:02 UTC
fixed in zypper1.12.11