Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Removed duplicate line items and ordered the results by date#505

Merged
supriya3105 merged 2 commits intodevelopfrom
fixed-adding-multi-entries
Jun 22, 2022
Merged

Removed duplicate line items and ordered the results by date#505
supriya3105 merged 2 commits intodevelopfrom
fixed-adding-multi-entries

Conversation

@gowsik-ragunath
Copy link
Contributor

Notion card

Summary

  • Removed the duplicate line item entries in the New line item dropdown and Add multiple line item modal.
  • Ordered record by work_date.

Preview

https://www.loom.com/share/cd22f158de294573991b963b03810c46

Type of change

Please delete options that are not relevant.

  • 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
    not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • I have manually tested all workflows
  • I have performed a self-review of my own code
  • I have added automated tests for my code

@github-actions
Copy link

Current Code Coverage Percent of this PR:

89.35 %

Files having coverage below 100%

Impacted Files Coverage
/lib/custom_failure.rb 80.0 %
/app/controllers/users/invitations_controller.rb 86.36 %
/app/controllers/users/sessions_controller.rb 85.71 %
/app/services/invoice_payment/pdf_generation.rb 70.97 %
/app/services/invoice_payment/checkout.rb 44.0 %
/app/controllers/internal_api/v1/payment_settings_controller.rb 93.33 %
/app/controllers/internal_api/v1/profile_controller.rb 96.88 %
/app/controllers/internal_api/v1/companies_controller.rb 95.45 %
/app/controllers/internal_api/v1/payments/providers_controller.rb 94.74 %
/app/controllers/internal_api/v1/wise/recipients_controller.rb 90.0 %
/lib/benchmarking/benchmarker.rb 0.0 %

timesheet_entries.note as description,
project_members.hourly_rate as rate,
timesheet_entries.duration as qty"
).where.not(id: selected_entries)
Copy link
Member

Choose a reason for hiding this comment

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

@gowsik-ragunath can you add a test for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah @akhilgkrishnan - updated the existing test cases for this method.

Copy link
Member

@akhilgkrishnan akhilgkrishnan left a comment

Choose a reason for hiding this comment

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

LGTM

@akhilgkrishnan
Copy link
Member

@mohinid can you check why the CI is failing. Cypress packages are not installing

@mohinid
Copy link
Contributor

mohinid commented Jun 21, 2022

@mohinid can you check why the CI is failing. Cypress packages are not installing

@apoorv1316 Can you please check.

@apoorv1316
Copy link
Collaborator

@gowsik-ragunath Why this PR is even installing cypress on CI I haven't merged the PR in which we are enabling the cypress test on CI. It's still open #490. cc @mohinid

@gowsik-ragunath
Copy link
Contributor Author

@apoorv1316 I'm not sure, I didn't make any changes in the CI/CD workflow file.

The first commit did pass but the second commit failed because of the cypress installation issue I checked the workflow file in my local environment it didn't have anything related to cypress.

@apoorv1316
Copy link
Collaborator

@gowsik-ragunath I am also not sure. Anway I re-run the job and all the checks seem fine now.

@supriya3105
Copy link
Contributor

@apoorv1316 Please retest this bug and approve/reject accordingly.

Copy link
Contributor

@rohitjoshixyz rohitjoshixyz left a comment

Choose a reason for hiding this comment

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

We should add an index on work date if we are sorting based on it cc @keshavbiswa

Copy link
Collaborator

@apoorv1316 apoorv1316 left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @gowsik-ragunath for fixing this. cc @supriya3105

@supriya3105
Copy link
Contributor

@gowsik-ragunath Merging this. Added a new Notion card for @rohitjoshixyz 's feedback.

@supriya3105 supriya3105 merged commit bbcc8f5 into develop Jun 22, 2022
@supriya3105 supriya3105 deleted the fixed-adding-multi-entries branch June 22, 2022 06:34
@gowsik-ragunath
Copy link
Contributor Author

@supriya3105 Actually the change requested by @rohitjoshixyz was completed, I will raise a separate PR for that shortly.

vipulnsward pushed a commit that referenced this pull request Feb 15, 2026
* Fixed the issue in loading duplicate line items and ordering the results

* Updated the new_line_item_entries model test case

Co-authored-by: Gowsik <[email protected]>
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.

6 participants