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

Capacity: Has softwares #16477

Merged
merged 7 commits into from
Apr 17, 2024

Conversation

RomainLvr
Copy link
Contributor

@RomainLvr RomainLvr commented Jan 31, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #number

image

@RomainLvr RomainLvr self-assigned this Jan 31, 2024
@RomainLvr RomainLvr changed the title Feature/generic softwares Capacity: Has softwares Jan 31, 2024
Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

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

Some changes were merged in the main branch recently.

  1. Each capacity should declare the relations to be cloned when an asset is clone. For the HasSoftwaresCapacity, you should declare them like this:
    public function getCloneRelations(): array
    {
        return [
            Item_SoftwareVersion::class,
            Item_SoftwareLicense::class,
        ];
    }

A test should also be added for this. See #16454 for some inspiration.

  1. Each capacity should implement isUsed() and getCapacityUsageDescription() methods, see Warn user about data loss when capacities are disabled #16472. Your test class should now extends the Glpi\Tests\CapacityTestCase class and implement its abstracts methods.

@cedric-anne cedric-anne added this to the 11.0.0 milestone Mar 19, 2024
@cedric-anne cedric-anne merged commit 6c6a43d into glpi-project:main Apr 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants