Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Reload work package before comparing its time values

Klaus Zanders7ec43b59c6ac
diff --git a/modules/bim/spec/requests/api/bcf/v2_1/topics_api_spec.rb b/modules/bim/spec/requests/api/bcf/v2_1/topics_api_spec.rb
index ec068c9c42a..918736f945c 100644
--- a/modules/bim/spec/requests/api/bcf/v2_1/topics_api_spec.rb
+++ b/modules/bim/spec/requests/api/bcf/v2_1/topics_api_spec.rb
@@ -586,7 +586,7 @@ RSpec.describe "BCF 2.1 topics resource", content_type: :json do
description: nil,
base: nil
)
- work_package = base || issue.work_package
+ work_package = (base || issue.work_package).reload
{
guid: issue&.uuid,
@@ -603,9 +603,9 @@ RSpec.describe "BCF 2.1 topics resource", content_type: :json do
due_date: due_date || base&.due_date,
stage: nil,
creation_author: creation_author_mail,
- creation_date: work_package&.created_at&.iso8601(3),
+ creation_date: work_package&.created_at,
modified_author: modified_author_mail,
- modified_date: work_package&.updated_at&.iso8601(3),
+ modified_date: work_package&.updated_at,
description: description || base&.description,
authorization: {
topic_status: [(base && base.status.name) || default_status.name],