Skip to content

Commit

Permalink
Merge pull request #13730 from saraycp/write_issue_trackers_to_backend
Browse files Browse the repository at this point in the history
Write issue trackers to backend after seeding them
  • Loading branch information
Dany Marcoux authored Jan 23, 2023
2 parents c9249ea + 79799c0 commit 9181596
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/api/app/models/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ def update_issue_list
end

def parse_issues_xml(query, force_state = nil)
# The issue trackers should have been written to the backend before this point (IssueTrackerWriteToBackendJob)
begin
answer = Backend::Connection.post(source_path(nil, query))
rescue Backend::Error => e
Expand Down
7 changes: 6 additions & 1 deletion src/api/lib/tasks/dev.rake
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ namespace :dev do
task :bootstrap, [:old_test_suite] => [:prepare, :environment] do |_t, args|
args.with_defaults(old_test_suite: false)

puts 'Creating the database...'
begin
Rake::Task['db:version'].invoke
rescue StandardError
puts 'Creating and seeding the database...'
Rake::Task['db:setup'].invoke
if args.old_test_suite
puts 'Old test suite. Loading fixtures...'
Expand Down Expand Up @@ -84,6 +84,11 @@ namespace :dev do
puts 'Enable feature toggles for their group'
Rake::Task['flipper:enable_features_for_group'].invoke

# Issue trackers were seeded into the database but never written to the backend.
# If they are not in the backend, the issues won't be tracked from changes files or patchinfos.
puts 'Writing issue trackers into backend'
IssueTrackerWriteToBackendJob.perform_now

iggy = create(:staff_user, login: 'Iggy')
admin = User.get_default_admin
User.session = admin
Expand Down

0 comments on commit 9181596

Please sign in to comment.