fetching data from an external value.

Support for v6.x of our Scheduling components


User avatar
ce.alicanonal
Posts: 88
Joined: Wed Sep 09, 2020 11:56 am

Re: fetching data from an external value.

Post by ce.alicanonal »

hi mats i live in turkey dollars here and really very expensive. I want to understand if it is suitable for me as I know that it is not possible to return the product when I receive it. What I want is I explained in the picture, what I want to do is to filter the tasks by name. For example, I am initially sending a second project and it is coming. Then when I click the button, I want the Main project to come. i did this but gantt doesn't load again. The main project is coming but it does not show, it still remains as a second project. Sorry, I don't know if I could express myself.

Attachments
r3.png
r3.png (63.34 KiB) Viewed 208 times
r2.png
r2.png (67.01 KiB) Viewed 208 times
r1.png
r1.png (53.13 KiB) Viewed 208 times

User avatar
fabio.policeno
Core Developer
Core Developer
Posts: 171
Joined: Sun Jul 12, 2020 8:22 pm

Re: fetching data from an external value.

Post by fabio.policeno »

Hi ce.alicanonal,

Could you please post here the JSON result from your request with the data of your project that you want to load on gantt?

Thank you!

Fabio Jr. Policeno
Core Developer


User avatar
fabio.policeno
Core Developer
Core Developer
Posts: 171
Joined: Sun Jul 12, 2020 8:22 pm

Re: fetching data from an external value.

Post by fabio.policeno »

Also, please check your request about the MainProject is red, means there is a problem with your server (.net) not with client side (javascript). You have to fix your server to return a JSON correctly without errors and then check the client side (javascript) what is the problem.

Fabio Jr. Policeno
Core Developer


User avatar
ce.alicanonal
Posts: 88
Joined: Wed Sep 09, 2020 11:56 am

Re: fetching data from an external value.

Post by ce.alicanonal »

It doesn't appear red anymore. The main project is coming right. It returns 200 status codes but there is no change on the screen. outgoing json as follows.

Code: Select all

{"calendars":{"rows":[{"Id":1,"Name":"General","DaysPerMonth":20,"DaysPerWeek":5,"HoursPerDay":8,"WeekendFirstDay":6,"WeekendSecondDay":0,"DefaultAvailability":["08:00-12:00","13:00-17:00"],"WeekendsAreWorkdays":false,"Days":{"rows":[{"Id":1,"Name":"Some big holiday","Type":"DAY","Date":"2010-01-14T00:00:00","Weekday":null,"OverrideStartDate":null,"OverrideEndDate":null,"Cls":"gnt-national-holiday","IsWorkingDay":false,"calendarId":"1","Availability":null}],"total":1},"leaf":false,"children":[{"Id":2,"Name":"Holidays","DaysPerMonth":20,"DaysPerWeek":5,"HoursPerDay":8,"WeekendFirstDay":6,"WeekendSecondDay":0,"DefaultAvailability":["08:00-12:00"],"WeekendsAreWorkdays":false,"Days":{"rows":[{"Id":2,"Name":"Mats's birthday","Type":"DAY","Date":"2010-01-13T00:00:00","Weekday":null,"OverrideStartDate":null,"OverrideEndDate":null,"Cls":"gnt-national-holiday","IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":3,"Name":"Bryntum company holiday","Type":"DAY","Date":"2010-02-01T00:00:00","Weekday":null,"OverrideStartDate":null,"OverrideEndDate":null,"Cls":"gnt-company-holiday","IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":4,"Name":"Bryntum 1st birthday","Type":"DAY","Date":"2010-12-01T00:00:00","Weekday":null,"OverrideStartDate":null,"OverrideEndDate":null,"Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":5,"Name":"Half working day","Type":"DAY","Date":"2012-03-27T00:00:00","Weekday":null,"OverrideStartDate":null,"OverrideEndDate":null,"Cls":null,"IsWorkingDay":true,"calendarId":"2","Availability":["08:00-12:00"]},{"Id":6,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":-1,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":7,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":0,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":8,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":1,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":true,"calendarId":"2","Availability":["08:00-12:00"]},{"Id":9,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":2,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":true,"calendarId":"2","Availability":["13:00-15:00"]},{"Id":10,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":3,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":11,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":4,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":true,"calendarId":"2","Availability":["08:00-12:00"]},{"Id":12,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":5,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":13,"Name":"Non standard week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":6,"OverrideStartDate":"2012-03-25T00:00:00","OverrideEndDate":"2012-03-31T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":14,"Name":"Non standard feb week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":-1,"OverrideStartDate":"2012-02-25T00:00:00","OverrideEndDate":"2012-02-28T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":15,"Name":"Non standard feb week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":0,"OverrideStartDate":"2012-02-25T00:00:00","OverrideEndDate":"2012-02-28T00:00:00","Cls":null,"IsWorkingDay":false,"calendarId":"2","Availability":null},{"Id":16,"Name":"Non standard feb week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":1,"OverrideStartDate":"2012-02-25T00:00:00","OverrideEndDate":"2012-02-28T00:00:00","Cls":null,"IsWorkingDay":true,"calendarId":"2","Availability":["08:00-12:00"]},{"Id":17,"Name":"Non standard feb week","Type":"WEEKDAYOVERRIDE","Date":null,"Weekday":2,"OverrideStartDate":"2012-02-25T00:00:00","OverrideEndDate":"2012-02-28T00:00:00","Cls":null,"IsWorkingDay":true,"calendarId":"2","Availability":["13:00-15:00"]}],"total":16},"leaf":true,"children":null,"parentId":"1"}],"parentId":null},{"Id":3,"Name":"Night shift","DaysPerMonth":20,"DaysPerWeek":5,"HoursPerDay":8,"WeekendFirstDay":6,"WeekendSecondDay":0,"DefaultAvailability":["00:00-06:00","22:00-24:00"],"WeekendsAreWorkdays":false,"Days":{"rows":[],"total":0},"leaf":true,"children":null,"parentId":null}],"metaData":{"projectCalendar":1}},"resources":{"rows":[{"Tasks":[],"CalendarId":"","Id":1007,"Name":"Alican","Kadi":"alcnonl42","Sifre":"03320332aa","Yetki":1},{"Tasks":[],"CalendarId":"","Id":1008,"Name":"Mehmet","Kadi":"mhmt42","Sifre":"03320332aa","Yetki":2}],"total":2},"tasks":{"rows":[{"Segments":[],"Resource":null,"CalendarId":null,"leaf":false,"children":[{"Segments":[],"Resource":null,"CalendarId":null,"leaf":false,"children":[{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":10,"Name":"Research","StartDate":"2012-09-20T08:00:00","EndDate":"2012-10-03T17:00:00","Duration":10.00,"DurationUnit":"d","PercentDone":100.00,"SchedulingMode":"DynamicAssignment","BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":0,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"5"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":12,"Name":"Tests","StartDate":"2012-10-04T08:00:00","EndDate":"2012-10-16T17:00:00","Duration":9.00,"DurationUnit":"d","PercentDone":100.00,"SchedulingMode":"DynamicAssignment","BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":1,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"5"}],"Id":5,"Name":"Alpha","StartDate":"2012-09-20T08:00:00","EndDate":"2012-10-16T17:00:00","Duration":19.00,"DurationUnit":"d","PercentDone":100.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":0,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":"startnoearlierthan","ConstraintDate":"2012-09-20T08:00:00","ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":true,"Color":null,"ResourcesID":null,"parentId":"1"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":false,"children":[{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":3,"Name":"Release","StartDate":"2012-10-24T17:00:00","EndDate":"2012-10-24T17:00:00","Duration":0.00,"DurationUnit":"d","PercentDone":100.00,"SchedulingMode":"DynamicAssignment","BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":6,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":true,"Color":null,"ResourcesID":null,"parentId":"6"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":13,"Name":"Refactoring after Alpha","StartDate":"2012-09-14T08:00:00","EndDate":"2012-10-08T17:00:00","Duration":17.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":0,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"6"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":14,"Name":"Tests","StartDate":"2012-10-09T08:00:00","EndDate":"2012-10-15T17:00:00","Duration":5.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":1,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"6"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":15,"Name":"Internal beta","StartDate":"2012-10-16T08:00:00","EndDate":"2012-11-05T17:00:00","Duration":15.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":2,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"6"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":16,"Name":"Additional testing","StartDate":"2012-10-16T08:00:00","EndDate":"2012-11-13T17:00:00","Duration":21.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":3,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"6"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":17,"Name":"Public beta","StartDate":"2012-10-16T08:00:00","EndDate":"2012-11-20T17:00:00","Duration":26.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":4,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"6"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":18,"Name":"Release","StartDate":"2012-11-13T17:00:00","EndDate":"2012-11-13T17:00:00","Duration":0.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":5,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":null,"ConstraintDate":null,"ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"6"}],"Id":6,"Name":"Beta","StartDate":"2012-09-14T08:00:00","EndDate":"2012-11-20T17:00:00","Duration":48.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":null,"BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":1,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":"startnoearlierthan","ConstraintDate":"2012-09-14T08:00:00","ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":true,"Color":null,"ResourcesID":null,"parentId":"1"},{"Segments":[{"TaskId":"7","Id":4,"StartDate":"2012-09-25T08:00:00","EndDate":"2012-10-02T17:00:00","Duration":6.00,"DurationUnit":"d","Cls":""},{"TaskId":"7","Id":5,"StartDate":"2012-10-04T08:00:00","EndDate":"2012-11-13T17:00:00","Duration":29.00,"DurationUnit":"d","Cls":""}],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":7,"Name":"Marketing","StartDate":"2012-09-25T08:00:00","EndDate":"2012-11-13T17:00:00","Duration":35.00,"DurationUnit":"d","PercentDone":40.00,"SchedulingMode":"FixedDuration","BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":2,"expanded":false,"Effort":560.00,"EffortUnit":"h","Note":null,"ConstraintType":"startnoearlierthan","ConstraintDate":"2012-09-25T08:00:00","ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":true,"Color":null,"ResourcesID":null,"parentId":"1"},{"Segments":[],"Resource":null,"CalendarId":null,"leaf":true,"children":null,"Id":11,"Name":"Marketing","StartDate":"2012-10-08T08:00:00","EndDate":"2012-10-12T17:00:00","Duration":5.00,"DurationUnit":"d","PercentDone":0.00,"SchedulingMode":"Normal","BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":3,"expanded":false,"Effort":null,"EffortUnit":null,"Note":null,"ConstraintType":"startnoearlierthan","ConstraintDate":"2012-10-08T08:00:00","ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":"1"}],"Id":1,"Name":"Main project","StartDate":"2012-09-14T08:00:00","EndDate":"2012-11-20T17:00:00","Duration":48.00,"DurationUnit":"d","PercentDone":23.07,"SchedulingMode":"Normal","BaselineStartDate":null,"BaselineEndDate":null,"BaselinePercentDone":null,"Cls":"","index":1,"expanded":false,"Effort":560.00,"EffortUnit":"h","Note":null,"ConstraintType":"finishnolaterthan","ConstraintDate":"2012-12-24T17:00:00","ManuallyScheduled":false,"Draggable":true,"Resizable":true,"Rollup":false,"ShowInTimeline":false,"Color":null,"ResourcesID":null,"parentId":null}]},"assignments":{"rows":[{"Id":1005,"Units":100,"TaskId":"1","ResourceId":"1007"},{"Id":2003,"Units":100,"TaskId":"1","ResourceId":"1008"},{"Id":3003,"Units":100,"TaskId":"7","ResourceId":"1008"},{"Id":3004,"Units":100,"TaskId":"7","ResourceId":"1007"}],"total":4},"dependencies":{"rows":[{"Id":1,"Type":2,"Cls":"","Lag":0.00,"LagUnit":"d","From":"8","To":"9"},{"Id":2,"Type":2,"Cls":"","Lag":0.00,"LagUnit":"d","From":"13","To":"14"},{"Id":3,"Type":2,"Cls":"","Lag":0.00,"LagUnit":"d","From":"14","To":"15"},{"Id":4,"Type":0,"Cls":"","Lag":0.00,"LagUnit":"d","From":"16","To":"17"},{"Id":5,"Type":0,"Cls":"","Lag":0.00,"LagUnit":"d","From":"15","To":"16"},{"Id":8,"Type":2,"Cls":"","Lag":0.00,"LagUnit":"d","From":"7","To":"18"},{"Id":1014,"Type":2,"Cls":"","Lag":0.00,"LagUnit":"d","From":"6","To":"5"},{"Id":1016,"Type":2,"Cls":"","Lag":0.00,"LagUnit":"d","From":"7","To":"5"}],"total":8},"revision":55,"success":true,"requestId":88893394507}
Attachments
u1.png
u1.png (68.89 KiB) Viewed 202 times

User avatar
fabio.policeno
Core Developer
Core Developer
Posts: 171
Joined: Sun Jul 12, 2020 8:22 pm

Re: fetching data from an external value.

Post by fabio.policeno »

Please use this example: https://www.bryntum.com/examples/gantt-for-extjs/kitchensink/#examples/basic

To check the correct json format on request (https://www.bryntum.com/examples/gantt-for-extjs/basic/data/tasks.json?_dc=1600702295358&node=root) and compare with yours, after that you can debug and check what is the problem and why it is not loading to the gantt.

Also check the documentation and guides are there to understand how it works: https://www.bryntum.com/docs/gantt-for-extjs/#!/guide/gantt_data_integration The is a short json sample response of how the data should come to populate the gantt.

Fabio Jr. Policeno
Core Developer


User avatar
ce.alicanonal
Posts: 88
Joined: Wed Sep 09, 2020 11:56 am

Re: fetching data from an external value.

Post by ce.alicanonal »

hello did you review my fabio code? Is there anything in this code that catches your eye, is everything true?

Can you review if I shoot a video and send you?

Attachments
hh.png
hh.png (70.35 KiB) Viewed 199 times

User avatar
fabio.policeno
Core Developer
Core Developer
Posts: 171
Joined: Sun Jul 12, 2020 8:22 pm

Re: fetching data from an external value.

Post by fabio.policeno »

ce.alicanonal, as explained before we can't review your whole project, I just checked that your json is not like the json examples (name field, etc). You can use tools like https://jsoncompare.com/ to format and compare json and see what is the problem with your json.

If you can't figure out, we really need a simple minimum example/demo from you showing the problem without backend like .net, but just a json file connected to some our clean demo, then we will be able to help you.

I would recommend you use the ext gantt simple example (https://www.bryntum.com/examples/gantt-for-extjs/kitchensink/#examples/basic), run on your local and make just simple change code lines and then show us your try.

Again, I recommend you read our guides, will help a lot: https://www.bryntum.com/docs/gantt-for-extjs/#!/guide/gantt_data_integration

Fabio Jr. Policeno
Core Developer


User avatar
fabio.policeno
Core Developer
Core Developer
Posts: 171
Joined: Sun Jul 12, 2020 8:22 pm

Re: fetching data from an external value.

Post by fabio.policeno »

About your last image problem, I didn't see any problem on that short code. This is why I believe your should review your JSON data that comes from your .net server side.

Fabio Jr. Policeno
Core Developer


User avatar
ce.alicanonal
Posts: 88
Joined: Wed Sep 09, 2020 11:56 am

Re: fetching data from an external value.

Post by ce.alicanonal »

Thank you very much I thought there was a mistake in the code so I looked at the code-oriented event, I know that I need to investigate the server side, I will search for you again, thank you for your polite answer :)


User avatar
fabio.policeno
Core Developer
Core Developer
Posts: 171
Joined: Sun Jul 12, 2020 8:22 pm

Re: fetching data from an external value.

Post by fabio.policeno »

ok, I will keep this post open, anything I can help please let me know.

Fabio Jr. Policeno
Core Developer


Post Reply