macports / macports-webapp

Web application to display information about ports, build history and installation statistics
https://ports.macports.org/
BSD 2-Clause "Simplified" License
56 stars 27 forks source link

Ticket query: Allow comma as word separator #319

Closed Dave-Allured closed 2 years ago

Dave-Allured commented 2 years ago

Bug fix. Support comma in addition to space, as word separator between multiple port names.

Example before bug fix: https://trac.macports.org/report/16?max=1000&PORT=(%5E%7C%5Cs)libheif($%7C%5Cs)

After bug fix: https://trac.macports.org/report/16?max=1000&PORT=(%5E%7C%5Cs%7C,)libheif($%7C%5Cs%7C,)

codecov[bot] commented 2 years ago

Codecov Report

Merging #319 (1082927) into main (24bfa2b) will increase coverage by 0.03%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #319      +/-   ##
==========================================
+ Coverage   81.45%   81.49%   +0.03%     
==========================================
  Files         111      111              
  Lines        2750     2750              
  Branches      214      214              
==========================================
+ Hits         2240     2241       +1     
  Misses        464      464              
+ Partials       46       45       -1     
Impacted Files Coverage Δ
buildhistory/tests.py 100.00% <0.00%> (+0.86%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 24bfa2b...1082927. Read the comment docs.

arjunsalyan commented 2 years ago

Thank you. This looks good.

Dave-Allured commented 2 years ago

Great. For a more interesting example, plug "gcc11" or some other port name with many tickets into those two URL's.

https://trac.macports.org/report/16?max=1000&PORT=(%5E%7C%5Cs)gcc11($%7C%5Cs) https://trac.macports.org/report/16?max=1000&PORT=(%5E%7C%5Cs%7C,)gcc11($%7C%5Cs%7C,)

Also compare with the original behavior of the "PORT" dialog box on the Trac Report no. 16 query page. In essence, the original no. 16 query matches by substring. The webapp matches only full port names, which IMO is most appropriate for this webapp. You can see that the results are different from above, in this example:

https://trac.macports.org/report/16?max=1000&PORT=gcc11