View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
18557Bug reportsSurvey participants (Tokens)public2023-02-21 14:41
Reportermatithyah Assigned Toollehar  
PrioritynormalSeverityminor 
Status feedbackResolutionopen 
Product Version5.4.x 
Summary18557: Email Template Attachments appear to carry over with copied survey, but do not work
Description

Surveys that are copied appear to carry over attachments inside the Email templates, but the invitation emails (for example) have no attachments when sent.

When viewing the copied survey's Email template page, the attachment appears; but it seems to be linked back to the file in the previous survey, rather than creating a new file for the new survey in the copying process. I wonder whether the invitation sending code disregards file attachments that belong to other surveys? Even though the editing page can access it.

Steps To Reproduce

Steps to reproduce

Set up a basic survey.
Attach a file to the Invitation Email template.
Add a Survey participant, and send them an invitation email

Email is sent with attachment.
Create a new survey by copying the first survey.
Leave the 'Copy survey resource files and adapt links' ticked when copying.
View the Invitation Email template - file appears as attached.
Add a Survey participant to the second survey, and send them an invitation email
Email is sent without attachment.

Expected result

Second/copied survey's invitation is sent with attachment.

Actual result

Second/copied survey's invitation is sent without attachment.

TagsNo tags attached.
Bug heat12
Complete LimeSurvey version number (& build)5.4.15+221212
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmariadb 10.5.16
Server OS (if known)Linux Gentoo
Webserver software & version (if known)
PHP Version7.4.33

Relationships

related to 18602 assignedgabrieljenik When surveys are copied without copying attachments, attachment info is copied but not updated. 

Users monitoring this issue

User List matithyah

Activities

matithyah

matithyah

2022-12-15 05:00

reporter   ~73124

Apologies for the formatting mistake in the Steps to Reproduce box!

gabrieljenik

gabrieljenik

2023-01-23 13:13

manager   ~73533

The problem is that the attachment data array is not updated when you copy, so the URL/path still points to the original survey file.

Translate Links function was updated as well to be able to treat local paths

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2861

gabrieljenik

gabrieljenik

2023-01-23 13:19

manager   ~73534

This link translation only happens if the copy resources checkbox is check.

If it is not checked, the attachments info is copied but not updated.
Should we remove all attachments if so?
Add a new ticket?

c_schmitz

c_schmitz

2023-01-23 13:33

administrator   ~73535

Remove the attachments, but show an additional message in the result screen if that happened.

DenisChenu

DenisChenu

2023-01-23 13:46

developer   ~73538

If it is not checked, the attachments info is copied but not updated.
Add a new ticket?

Still a good idea, because it's not the same issue.

ollehar

ollehar

2023-02-21 14:41

administrator   ~73903

Waiting for feedback from Carsten regarding security warning in the PR.

Issue History

Date Modified Username Field Change
2022-12-15 04:58 matithyah New Issue
2022-12-15 04:59 matithyah Issue Monitored: matithyah
2022-12-15 04:59 matithyah Bug heat 0 => 2
2022-12-15 05:00 matithyah Note Added: 73124
2022-12-15 05:00 matithyah Bug heat 2 => 4
2022-12-16 12:26 ollehar Priority none => normal
2022-12-19 17:17 gabrieljenik Status new => acknowledged
2023-01-17 17:12 gabrieljenik Assigned To => gabrieljenik
2023-01-17 17:12 gabrieljenik Status acknowledged => assigned
2023-01-23 13:13 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-01-23 13:13 gabrieljenik Status assigned => ready for code review
2023-01-23 13:13 gabrieljenik Note Added: 73533
2023-01-23 13:13 gabrieljenik Bug heat 4 => 6
2023-01-23 13:19 gabrieljenik Note Added: 73534
2023-01-23 13:33 c_schmitz Note Added: 73535
2023-01-23 13:33 c_schmitz Bug heat 6 => 8
2023-01-23 13:46 DenisChenu Assigned To DenisChenu =>
2023-01-23 13:46 DenisChenu Status ready for code review => ready for testing
2023-01-23 13:46 DenisChenu Note Added: 73538
2023-01-23 13:46 DenisChenu Bug heat 8 => 10
2023-01-23 13:54 gabrieljenik Issue cloned: 18602
2023-01-23 13:54 gabrieljenik Relationship added related to 18602
2023-02-02 23:46 gabrieljenik Assigned To => ollehar
2023-02-02 23:46 gabrieljenik Status ready for testing => ready for merge
2023-02-21 14:41 ollehar Status ready for merge => feedback
2023-02-21 14:41 ollehar Note Added: 73903
2023-02-21 14:41 ollehar Bug heat 10 => 12