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

INVOICE: do not use activity name as fallback for description #4884

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

kevinpapst
Copy link
Member

Description

Currently an empty description in a timesheet (and expense) causes Kimai to inject the activity name as invoice variable entry.description in the default calculator (one row per entry).

This makes it impossible to detect whether the description was set or not and apply custom fallback logic.

This was removed: the field entry.description contains now the content from the timesheet. If empty then this field is empty as well.

A replacement field was added called entry.description_safe which will use the activity name as fallback and if that is empty the project name.

This is technically both a bug fix and BC break.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I verified that my code applies to the guidelines (composer code-check)
  • I updated the documentation (see here)
  • I agree that this code is used in Kimai (see license)

@kevinpapst kevinpapst added this to the 2.18 milestone May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.75%. Comparing base (e29ef25) to head (ef671c4).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4884   +/-   ##
=========================================
  Coverage     87.75%   87.75%           
+ Complexity     8975     8973    -2     
=========================================
  Files           797      797           
  Lines         29431    29428    -3     
=========================================
- Hits          25828    25826    -2     
+ Misses         3603     3602    -1     
Files Coverage Δ
...rc/Invoice/Calculator/AbstractMergedCalculator.php 92.10% <ø> (-0.40%) ⬇️
...rc/Invoice/Hydrator/InvoiceItemDefaultHydrator.php 100.00% <100.00%> (+1.01%) ⬆️

@kevinpapst kevinpapst marked this pull request as ready for review June 3, 2024 17:01
@kevinpapst kevinpapst merged commit 93ca983 into main Jun 3, 2024
6 checks passed
@kevinpapst kevinpapst deleted the invoice-description branch June 3, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant