Skip to content

Conversation

@gustavobascope
Copy link
Contributor

Issue & Reproduction Steps

Dev Link functionality should include Service Task (Custom Packages)

Solution

Added the new service task asset to the exportermap and processexporter

How to Test

As a Process Designer,
I want Dev Link to include packages such as Service Tasks,
So I can import all relarted assets from a Dev Link, including the packages like service tasks which are used by some processes.

Related Tickets & Packages

https://processmaker.atlassian.net/browse/FOUR-26812
https://github.com/ProcessMaker/package-service-task/pull/2

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

$config = json_decode(Utils::getAttributeAtXPath($this->model, $path, 'pm:config'), true);

// Update resource ID in config
$config['resource']['id'] = $dependent->model->id;
Copy link

Choose a reason for hiding this comment

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

Bug: Invalid JSON Handling in Resource Import

The importServiceTaskResources method attempts to update $config['resource']['id'] without validating the pm:config attribute. If json_decode returns null due to invalid JSON, or if the decoded config lacks the resource key, this causes PHP errors.

Fix in Cursor Fix in Web

Copy link
Contributor

Choose a reason for hiding this comment

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

@gustavobascope consider to include this defensive code in case the pm:config is not defined

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@caleeli caleeli left a comment

Choose a reason for hiding this comment

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

@gustavobascope consider to include this defensive code in case the pm:config is not defined

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.

3 participants