Gantt Resource Percentage Bug

1 Answer 45 Views
Gantt
Mike
Top achievements
Rank 1
Mike asked on 25 Dec 2023, 11:01 PM | edited on 26 Dec 2023, 07:10 PM

Edit: Looks like I posted this in wrong place. Now posted in feedback and bugs.

 

When assigning multiple resources and percentages, the first item in list always goes back to 100%.

It saves back to UI correctly but as soon as you leave or refresh page it goes back to 100% on first item and that's what's saved in database.

The online demo has the same code but demo doesn't save at all.

See attached screen shots.

Attila Antal
Telerik team
commented on 28 Dec 2023, 11:09 AM

Hi Mike,

To be able to troubleshoot the issue, please clarify which is the Product/UI Component that you are experiencing the issue with.

From the Screenshots, we can see a Window, and Grid components, yet this forum was submitted for the Gantt.

We would also like to know whether you're using the Telerik UI for ASP.NET AJAX components or the Kendo UI components.

Additionally, please share the code (implementation) of the UI component so we can see how it was configured and bound to data. Based on that we will have a better understanding.

I look forward to hearing from you.

 

Mike
Top achievements
Rank 1
commented on 29 Dec 2023, 04:38 AM

Using Telerik UI for ASP.NET AJAX

I'm currently traveling out of country so I'm not sure I can get to the code until I return.

I'm using code from here:
https://demos.telerik.com/aspnet-ajax/gantt/examples/functionality/resources/defaultvb.aspx

In the demo on that page all of the tasks assigned multiple resources all have the first resource item with 100% also.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Attila Antal
Telerik team
answered on 02 Jan 2024, 02:57 PM | edited on 02 Jan 2024, 02:58 PM

Hi Mike,

Firstly, I would like to wish you a Happy New Year 2024!

Thanks for the clarification. It was sufficient for us to understand which product is affected. 

I've been playing around the demo a little and as you mentioned it does not save the "Units" of the resources. When I started troubleshooting the problem I noticed that the SQL Query that is supposed to update the database was incorrect.

The Resource assignments are in the table called "GanttResourceAssignments", but the SQL Query is updating "GanttDependencies" table. Also, it was trying to update the "Units" field based on "Type" value.

UpdateCommand="UPDATE [GanttDependencies] SET [TaskID] = @TaskID, [ResourceID] = @ResourceID, [Units] = @Type WHERE [ID] = @ID"

From the Database Structure, you can see that the Tables and fields do not match, hence the update did not happen.

 

Fix the UpdateCommand to update the correct table, and then the Resource Assignments Units will be updated accordingly.

UpdateCommand="UPDATE [GanttResourceAssignments] SET [TaskID] = @TaskID, [ResourceID] = @ResourceID, [Units] = @Units WHERE [ID] = @ID"

 

I will also update the example in the demos to reflect this.

Mike
Top achievements
Rank 1
commented on 02 Jan 2024, 03:35 PM

All fixed thanks for the speedy response!
Tags
Gantt
Asked by
Mike
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or