processmaker icon indicating copy to clipboard operation
processmaker copied to clipboard

FOUR-19287: Incorrect model_id assignment during Import in ProcessExporter importEmbed

Open eiresendez opened this issue 1 year ago • 4 comments

Issue & Reproduction Steps

When importing a Process as a Template it appears that it does not include the LaunchPad embedded links.

Solution

  • Update code to save embed models associated with the process.
    • In ProcessExporter.php, added code to save the model_id attribute of embed models associated with the process.
    • In ProcessExporterTest.php, added tests to verify the saving and deletion of embed models associated with the process.

How to Test

  • Import the attached template process. (see JIRA)
  • Go to processes
  • The new imported process should have embed YouTube link.

Related Tickets & Packages

Code Review Checklist

  • [x] I have pulled this code locally and tested it on my instance, along with any associated packages.
  • [x] This code adheres to ProcessMaker Coding Guidelines.
  • [x] This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • [x] This solution fixes the bug reported in the original ticket.
  • [x] This solution does not alter the expected output of a component in a way that would break existing Processes.
  • [x] This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • [x] This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • [x] This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • [x] This ticket conforms to the PRD associated with this part of ProcessMaker.

eiresendez avatar Sep 20 '24 19:09 eiresendez

QA server K8S was successfully deployed https://ci-a641e3b394.engk8s.processmaker.net

tokensPM avatar Sep 30 '24 17:09 tokensPM

@eiresendez I tried to import this process and I can see this error: test_embed.json

Ready for import

preview
Done
TypeError: ProcessMaker\ImportExport\Exporters\ExporterBase::incrementNumber(): Argument #1 ($value) must be of type int, null given, called in /opt/processmaker/ProcessMaker/ImportExport/Exporters/ExporterBase.php on line 467

pmPaulis avatar Sep 30 '24 18:09 pmPaulis

QA server K8S was successfully deployed https://ci-a641e3b394.engk8s.processmaker.net

tokensPM avatar Sep 30 '24 23:09 tokensPM

QA server K8S was successfully deployed https://ci-a641e3b394.engk8s.processmaker.net

tokensPM avatar Oct 08 '24 17:10 tokensPM