Skip to content

Filter for scripts has substring bug #6

@havanagrawal

Description

@havanagrawal

Problem

One of the options for scripts is --filter which can accept property IDs such as P143. However, the way we check this has a bug, where it will also match properties such as P1436.

def should_fix(fix, filters):
    return any(filter in fix.summary for filter in filters)

Proposed Solution

Split the summary by spaces (and other token characters), and then for each filter, check containment, instead of checking the string directly.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions