Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restored value __REF__ #30607

Conversation

atm-jonathan
Copy link
Contributor

Instructions

FIX To restore the value of the REF key, the user can still use REF_CLIENT in an email template.

$topicmail = $outputlangs->trans($defaulttopic, '__REF__');
} elseif (!empty($object->ref_client)) {
$topicmail = $outputlangs->trans($defaulttopic, '__REF__ (__REF_CLIENT__)');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing this ?
Can you describe how to reproduce the bug ?

Copy link
Contributor Author

@atm-jonathan atm-jonathan Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no bugs
When you use the subtitution key ‘__REF__’ and you have filled in the ‘ref_client’ field in the interface, this field is concatenated with __REF__ in the email subject, which gives :
__REF__ (__REF_CLIENT__)
But at no time in the email template did we call the subtitution key __REF_CLIENT__.
Concatenation is imposed by the code.
If the user absolutely wanted to see the ref_client field in the subject line of their email, they could always add the __REF_CLIENT__ subtitution key in the subject line of their email template.
I just want that when we use __REF__ we display what corresponds to the __REF__ and don't concatenate anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To reproduce this behaviour, simply use an email template with the key __REF__ in the subject line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To reproduce this behaviour, simply use an email template with the key __REF__ in the subject line.

I do not succeed in reproducing the problem. I created an email template with REF as topic. When I send an email from a proposal P1 and ref_client PC1, after selecting the email template, the topic is set to P1 as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a mistake.
To reproduce, you don't need to use an email template.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a mistake. To reproduce, you don't need to use an email template.

So how did you do ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a customer who wants only their reference in the subject, without including the customer reference, even if the customer reference is set. How can we properly fix this?

Copy link
Member

@eldy eldy Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If user don't want the default email autofill behaviour, he can set its own email template and set it as default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so that's how we're going to do it
Thanks anyway

@eldy eldy added Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description) Works for me / Can't reproduce It seems not possible to reproduce the bug. labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description) Works for me / Can't reproduce It seems not possible to reproduce the bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants