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

fix: add ticket content from promoted followup #19040

Open
wants to merge 6 commits into
base: 10.0/bugfixes
Choose a base branch
from

Conversation

MyvTsv
Copy link
Contributor

@MyvTsv MyvTsv commented Feb 21, 2025

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes !36483
  • When a follow-up or a task is promoted to ticket, the content of the new ticket is not filled.

Screenshots (if appropriate):

@MyvTsv MyvTsv self-assigned this Feb 21, 2025
@MyvTsv MyvTsv requested review from stonebuzz and Rom1-B February 21, 2025 11:41
@MyvTsv MyvTsv marked this pull request as ready for review February 24, 2025 11:00
Copy link
Contributor

@cconard96 cconard96 left a comment

Choose a reason for hiding this comment

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

This is already handled in the Ticket class. Since changes made in #18611, there is a conflict that prevents the followup/task info from being used.

Also, this issue was reported on GitHub too in #18918

@MyvTsv MyvTsv requested a review from cconard96 February 24, 2025 14:34
Copy link
Contributor

@cconard96 cconard96 left a comment

Choose a reason for hiding this comment

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

This doesn't seem right to me. The goal is to only handle overriding the content during the initial form load when creating a ticket. Normally, nothing is in the saved input when the form first loads. With these changes, it looks like it is only an "initial creation" after the form reloads from something like changing the category.

@MyvTsv
Copy link
Contributor Author

MyvTsv commented Feb 25, 2025

This doesn't seem right to me. The goal is to only handle overriding the content during the initial form load when creating a ticket. Normally, nothing is in the saved input when the form first loads. With these changes, it looks like it is only an "initial creation" after the form reloads from something like changing the category.

I don’t think the bug related to the category not being selected is due to the fact that the promoted item identifier (_promoted_fup_id) is not present in the URL.

When the user clicks on the "Promote to ticket" button, the _promoted_fup_id is added to the URL and saved in a hidden field of the form. This allows, when the page is reloaded (following the change of category), not to lose the tracking ID that has been promoted as a ticket.

This PR for attempts to fix the bug in GLPI 10.0.18, which prevents the conversion of a follow-up into a ticket. This issue prevents the ticket description, as well as the person who wrote the follow-up, from going back to the creation form and linking to the original ticket.

@MyvTsv MyvTsv requested review from Rom1-B and cconard96 February 26, 2025 13:06
@cconard96
Copy link
Contributor

Its my fault for not adding an E2E test for my PR, but I think we need tests now to ensure all issues are fixed:

  • Promoting followup shows the content by default and any changes to the content is preserved during a page refresh (like changing categories during the ticket creation)
  • Creating a ticket from a project task shows the content by default and any changes to the content is preserved during a page refresh (like changing categories during the ticket creation)

@stonebuzz
Copy link
Contributor

Its my fault for not adding an E2E test for my PR, but I think we need tests now to ensure all issues are fixed:

  • Promoting followup shows the content by default and any changes to the content is preserved during a page refresh (like changing categories during the ticket creation)
  • Creating a ticket from a project task shows the content by default and any changes to the content is preserved during a page refresh (like changing categories during the ticket creation)

#18611 target bugfixes too

@stonebuzz
Copy link
Contributor

Its my fault for not adding an E2E test for my PR, but I think we need tests now to ensure all issues are fixed:

  • Promoting followup shows the content by default and any changes to the content is preserved during a page refresh (like changing categories during the ticket creation)
  • Creating a ticket from a project task shows the content by default and any changes to the content is preserved during a page refresh (like changing categories during the ticket creation)

#18611 target bugfixes too

Okay, your PR is now in main, but we'll have to wait until it is too before trying to set up an E2E test

@Rom1-B
Copy link
Contributor

Rom1-B commented Feb 27, 2025

@MyvTsv,
As there are no E2E tests yet. Can you please check manually that your fixture works for both cases?

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.

4 participants