Wrong JIRA hyperlinks in activity when changing the ticket ID
Summary
When I made a typo in a ticket ID, then went to update it, the JIRA URLs in the Activity link to completely unrelated tickets (neither the typo, nor the correct ticket).
Steps to reproduce
- Add a ticket ID with a typo, e.g.
EX-1243
into the start of a merge request title. This correctly links to the typo ticketEX-1243
on JIRA. - Fix the typo in the ticket ID, changing it to
EX-1234
This correctly links to the typo ticketEX-1234
on JIRA. - Observe that in the Activity list further down the Merge Request page, the history hyperlinks to
EX-12
andEX-123
, instead ofEX-1243
andEX-1234
Example Project
What is the current bug behavior?
When changing the JIRA ticket ID, the Activity history hyperlinks are to unrelated tickets, which are neither the from or to tickets.
What is the expected correct behavior?
When changing the JIRA ticket ID, the Activity history hyperlinks should be to the from and to tickets.
Relevant logs and/or screenshots
This example shows from ticket ID chainging from C360-1519
to C360-1591
, but the hyperlinks are incorrectly to unrelated tickets C360-15
and C360-159
.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) System information System: Ubuntu 22.04 Proxy: no Current User: git Using RVM: no Ruby Version: 3.1.4p223 Gem Version: 3.5.6 Bundler Version:2.5.6 Rake Version: 13.0.6 Redis Version: 7.0.15 Sidekiq Version:7.1.6 Go Version: unknown GitLab information Version: 16.10.2-ee Revision: 0be71eb07ff Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 13.14 URL: https://[redacted] HTTP Clone URL: https://[redacted]/some-group/some-project.git SSH Clone URL: git@[redacted]:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.34.0 (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.34.0 ? ... OK (14.34.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes Tables are truncated? ... skipped All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 3/1 ... yes 3/2 ... yes 3/3 ... yes 3/4 ... yes 3/5 ... yes 3/6 ... yes 3/8 ... yes 3/9 ... yes 3/10 ... yes 3/11 ... yes 3/12 ... yes 3/13 ... yes 3/14 ... yes 3/15 ... yes 3/16 ... yes 3/17 ... yes 3/18 ... yes 3/19 ... yes 3/20 ... yes 3/21 ... yes 3/22 ... yes 81/23 ... yes 27/26 ... yes 81/27 ... yes 81/28 ... yes 81/29 ... yes 81/30 ... yes 3/31 ... yes 3/32 ... yes 3/33 ... yes 81/34 ... yes 3/36 ... yes 3/37 ... yes 3/38 ... yes 3/39 ... yes 81/40 ... yes 3/41 ... yes 81/42 ... yes 81/43 ... yes 81/44 ... yes 81/45 ... yes 27/46 ... yes 81/47 ... yes 81/48 ... yes 81/49 ... yes 81/50 ... yes 81/51 ... yes 81/52 ... yes 3/53 ... yes Redis version >= 6.2.14? ... yes Ruby version >= 3.0.6 ? ... yes (3.1.4) Git user has default SSH configuration? ... yes Active users: ... 22 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... skipped (Advanced Search is disabled) All migrations must be finished before doing a major upgrade ... skipped (Advanced Search is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)