Problem with resizing a gantt task despite lack of such operation on a chart.

2 posts, 0 answers
  1. Piotr
    Piotr avatar
    14 posts
    Member since:
    Jul 2014

    Posted 04 Nov 2014 Link to this post

    I’ve found a kind of weird behaviour that occurs during change a progress value directly on a gantt chart, when after it, end of date is also changing. I tried to debug this scenario, to exclude bug on my webservices side. But in the same controller i cannot see any what supposed to be wrong. In a tracing, values to be set in business logic was fine.

    My model responsible for read/update looks like:

     public class GetTasksController : ApiController
            public IEnumerable<DCProdTask> Get()
                Soneta.Business.App.Login t = WebApiApplication.EnovaLogin;

                using (Session sesja = t.CreateSession(true, false))
                    DritProdukcjaModule PM = DritProdukcjaModule.GetInstance(sesja);
                    return PM.ProdTasks.CreateView()
                                     .Select(x => Mapper.Map<ProdTask, DCProdTask>(x));               
            public async Task<DCProdTask> Get([FromUri] ModelType value, string type)        
                IList<DCProdTask> persons = new System.Web.Script.Serialization.JavaScriptSerializer()
                DCProdTask[] arr = persons.ToArray<DCProdTask>();
                DCProdTask task = arr[0];            
                Soneta.Business.App.Login l = WebApiApplication.EnovaLogin;
                List<ProdTask> list = new List<ProdTask>();
                switch (type)
                    case "Update":  using (Session sesja = l.CreateSession(false, false))
                            using (ITransaction t = sesja.Logout(true))
                                DritProdukcjaModule PM = DritProdukcjaModule.GetInstance(sesja);
                                Soneta.Business.View view = PM.ProdTasks.CreateView();
                                view.Condition &= new FieldCondition.Equal("ID", task.ID);
                                view.LoadingRowsCount = 1;
                                ProdTask PTask = (ProdTask)view.GetFirst();
                                if (PTask != null)
                                    DateTime _start = Convert.ToDateTime(task.Start);
                                    DateTime _end = Convert.ToDateTime(task.End);
                                    Soneta.Types.Percent _percentComplete =
                                        new Soneta.Types.Percent(Convert.ToDecimal(task.PercentComplete));
                                    PTask.DataOd = new Soneta.Types.Date(_start);
                                    PTask.CzasOd = new Soneta.Types.Time(_start.Hour, _start.Minute);
                                    PTask.DataDo = new Soneta.Types.Date(_end);
                                    PTask.CzasDo = new Soneta.Types.Time(_end.Hour, _end.Minute);
                                    PTask.PercentComplete = _percentComplete;

                    default: break;
                return  Mapper.Map<ProdTask, DCProdTask>(list.ToArray<ProdTask>()[0]);                         

    I’ve attached a couple of screenshots to show a fake values providing to web service through the url, and response as JSON. What is curious, it only happen on a tasks with small data intervals between start and end. When i have huge gantt tasks and i change progress from Month view, i have not noticed such behaviour.

  2. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 06 Nov 2014 Link to this post


    We haven't encountered such problem at our side. In case the task representation in the timeline is too narrow, it is possible that the drag handle for the resize is activated during drag operation of the task progress update.

    Dimitar Terziev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top