Skip to content

Conversation

kevinjlope
Copy link
Contributor

Problem

If somebody added a new time entry and if in the DB not existing register about of the information the attribute activity_id. The application can not show the information about time entry and the reports, and return: the data can not be loaded.

The solution

When the user selects a new project, in the panel time clock, to default send an activity_id, and the DB.

@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #700 (4fd6cc0) into master (026006b) will increase coverage by 3.40%.
The diff coverage is 94.94%.

❗ Current head 4fd6cc0 differs from pull request most recent head f2dfb96. Consider uploading reports for the commit f2dfb96 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #700      +/-   ##
==========================================
+ Coverage   91.87%   95.28%   +3.40%     
==========================================
  Files          50      104      +54     
  Lines         517     2098    +1581     
  Branches       32      157     +125     
==========================================
+ Hits          475     1999    +1524     
- Misses         33       56      +23     
- Partials        9       43      +34     
Impacted Files Coverage Δ
src/app/app.component.ts 100.00% <ø> (ø)
...shared/pipes/filter-project/filter-project.pipe.ts 100.00% <ø> (+14.28%) ⬆️
...rc/app/modules/shared/store/technology.reducers.ts 62.50% <ø> (ø)
src/app/modules/user/services/user-info.service.ts 100.00% <ø> (ø)
src/app/modules/user/services/user.service.ts 100.00% <ø> (ø)
src/app/modules/user/store/user.actions.ts 100.00% <ø> (ø)
src/app/modules/user/store/user.effects.ts 100.00% <ø> (ø)
src/app/modules/user/store/user.reducer.ts 62.50% <ø> (ø)
src/app/modules/user/store/user.selectors.ts 100.00% <ø> (ø)
...sers/components/users-list/users-list.component.ts 100.00% <ø> (ø)
... and 145 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b5068a...f2dfb96. Read the comment docs.

Copy link
Contributor

@jcalarcon98 jcalarcon98 left a comment

Choose a reason for hiding this comment

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

Good Job Kevin 💥 , just a couple of things to say:
The main bug is solved with this PR, however, I think that the transition of putting a default activity is not transparent, for example, once you do Clock in and if by default you assign the first activity of the list of activities, the element select activities can take the focus, it is something that Fanny mentioned in the review of this bug, analyze if it is possible or it is not too complicated to make that behavior so that it can be implemented.
And please check my comments in the code.

@@ -7,6 +7,7 @@
formControlName="activity_id"
[class.is-invalid]="activity_id.invalid && activity_id.touched"
required>
<option value="" selected="selected"></option>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this change is causing this behavior at the time of displaying the activities:
image
I think from my point of view an empty option should not be displayed.

@jcalarcon98 jcalarcon98 reopened this Jun 29, 2021
@@ -88,6 +99,7 @@ export class ProjectListHoverComponent implements OnInit, OnDestroy {
start_date: new Date().toISOString(),
timezone_offset: new Date().getTimezoneOffset(),
technologies: [],
activity_id: this.activities[0].id,
Copy link
Collaborator

@scastillo-jp scastillo-jp Jun 29, 2021

Choose a reason for hiding this comment

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

In this index you can use
import _ from 'lodash';
activity_id: _.head(this.activities.id) OR activity_id: _.head(this.activities).id

Try with this options.

@kevinjlope kevinjlope force-pushed the TT-282-Data-could-not-be-loaded branch from f9e00fe to f2dfb96 Compare July 1, 2021 21:48
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 1, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kevinjlope kevinjlope merged commit 43d48d9 into master Jul 2, 2021
@kevinjlope kevinjlope deleted the TT-282-Data-could-not-be-loaded branch July 2, 2021 16:36
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