action #176826
openAutomatic label link is "broken" when job link is followed from the issue creation preview size:S
0%
Description
Observation¶
When a new issue linking a test is created in "openQA Project" and not "openQA Tests", the automatic label link from the comment to the issue is broken. See https://openqa.opensuse.org/tests/4842740#comment-710485 which should be an automatic comment created for #176820 - instead it says https://progress.opensuse.org/projects/openqatests/issues/new?issue%5Bcategory_id%5D=152&issue%5Bsubject%5D=test+fails+in+reproducer&issue%5Bdescription%5D=%23%23+Observation%0A%0AopenQA+test+in+scenario+openqa-Tumbleweed-dev-x86_64-openqa_install_nginx%40os-autoinst%2Fos-autoinst-distri-openQA%23reproducer%4064bit-2G+fails+in%0A%5Breproducer%5D%28https%3A%2F%2Fopenqa.opensuse.org%2Ftests%2F4842740%2Fmodules%2Freproducer%2Fsteps%2F4%29%0A%0A%23%23+Test+suite+description%0A%0A%0A%0A%23%23+Reproducible%0A%0AFails+since+%28at+least%29+Build+%5Bos-autoinst%2Fos-autoinst-distri-openQA%23reproducer%5D%28https%3A%2F%2Fopenqa.opensuse.org%2Ftests%2F4842739%29%0A%0A%0A%23%23+Expected+result%0A%0ALast+good%3A+%28unknown%29+%28or+more+recent%29%0A%0A%0A%23%23+Further+details%0A%0AAlways+latest+result+in+this+scenario%3A+%5Blatest%5D%28https%3A%2F%2Fopenqa.opensuse.org%2Ftests%2Flatest%3Farch%3Dx86_64%26distri%3Dopenqa%26flavor%3Ddev%26machine%3D64bit-2G%26test%3Dopenqa_install_nginx%2540os-autoinst%252Fos-autoinst-distri-openQA%2523reproducer%26version%3DTumbleweed%29%0A
Acceptance criteria¶
- AC1: No comment is created when so far a wrong one with a "new issue" link would be created.
Suggestion¶
- Check that the referer is an issue URL and e.g. not new issue or other types of URLs
- Use a mapping from bug trackers to an issue regex
- This could affect other bug trackers? Does this happen with Bugzilla?
- Code: sub mark_job_linked https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Schema/ResultSet/Jobs.pm#L468
Files