Skip to content

Conversation

@ntsirintanis
Copy link

No description provided.

@ntsirintanis
Copy link
Author

@gfcapalbo

@gfcapalbo
Copy link
Contributor

@ntsirintanis check out: 32a77d6

Copy link
Contributor

@gfcapalbo gfcapalbo left a comment

Choose a reason for hiding this comment

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

@ntsirintanis two small changes. but in general seems the way to go.
As revealed in testing , it will not cover the case of multiple addition once the user has changed the template. but that's okay, this is an improvement on current.

if not task.description_template_id:
continue
template_text = task.description_template_id.description or ""
if not template_text:
Copy link
Contributor

@gfcapalbo gfcapalbo Nov 19, 2025

Choose a reason for hiding this comment

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

this code is extra. it is strange we allow empty description, but if there is one, it would change nothing. just extra code. not needed.

continue
current = task.description or ""
# Avoid duplicating the same template content
if current == template_text or current.endswith(template_text):
Copy link
Contributor

Choose a reason for hiding this comment

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

Checkout my regex solution on v14. it covers the template present in any part of the text.
32a77d6

Copy link
Author

Choose a reason for hiding this comment

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

@gfcapalbo or instead of current.endswith(template_text), do something like current in template_text. The results should be the same exactly as the one

Copy link
Contributor

Choose a reason for hiding this comment

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

Works fine too. yes. Simpler as well.

@ntsirintanis ntsirintanis force-pushed the 16.0-fix-project_task_description_template_onchange branch from 58683f2 to 6424494 Compare November 27, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants