You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
puts"Issue with subject '#{issue_subject}' already exists in the project. Skipping creation."
37
-
else
38
-
issue=Issue.new(
39
-
project_id: project.id,
40
-
tracker: Tracker.first,# Assuming you have at least one tracker
41
-
subject: issue_subject,
42
-
description: "Users are not receiving signup confirmation emails in production.\nObserved: multiple users report they never receive the confirmation email after registering.\nExpected: users should receive a confirmation email that contains an activation link.",
43
-
author_id: author.id
44
-
)
45
-
46
-
ifissue.save
47
-
puts"Test issue created with ID: #{issue.id}"
48
-
49
-
# reload to obtain the latest lock_version before further updates
50
-
issue.reload
51
-
52
-
# 1) Add an initial note with reproduction steps and observations
53
-
issue.init_journal(author,"Initial analysis: no emails found in the mailer logs for recent signups. Repro steps: 1) Go to /signup 2) Create a new account 3) Observe no confirmation email received.")
54
-
ifissue.save
55
-
puts"Added initial note to issue ##{issue.id}."
56
-
else
57
-
puts"Failed to add initial note: #{issue.errors.full_messages.join(', ')}"
puts"Changed status of issue ##{issue.id} to '#{in_progress.name}' without a note."
84
-
else
85
-
puts"Failed to change status: #{issue.errors.full_messages.join(', ')}"
86
-
end
30
+
# --- 3. ADD SEPARATE UPDATES TO THE ISSUE HISTORY ---
31
+
# Each block now starts by re-finding the issue to guarantee a fresh object.
87
32
88
-
issue.reload
33
+
# Update 1: Add initial analysis note
34
+
issue=Issue.find(issue.id)# Re-find the issue
35
+
issue.init_journal(author,"Initial analysis: no emails found in the mailer logs for recent signups. Repro steps: 1) Go to /signup 2) Create a new account 3) Observe no confirmation email received.")
36
+
issue.save!
37
+
puts"Added initial note to issue ##{issue.id}."
89
38
90
-
# 4) Developer adds a follow-up note with findings (e.g. missing MAILER_HOST) and marks for fix
91
-
issue.init_journal(assignee,"Follow-up: found MAILER_HOST environment variable missing in production. Will add default and redeploy to staging for verification.")
92
-
issue.status=in_progress
93
-
ifissue.save
94
-
puts"Added developer follow-up note to issue ##{issue.id}."
95
-
else
96
-
puts"Failed to add developer note: #{issue.errors.full_messages.join(', ')}"
97
-
end
39
+
# Update 2: Assign, raise priority, and add a note
0 commit comments