Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Name object overridden when it is numeric value in Timeline

    Version 11.1p built 2017-12-05

    In the timeline widget, I used an ID field for the lane name instead of a character field as oppose to the sample, and I found it is causing subsequent errors.
    e.g for the lane I used employeeID (number) instead of EmployeeName (character)

    After a series of testing, I found, the library,ISC_Calendar itself tries to change it to corresponding value in the lane array if it is a number. see the code I found.

    setLane : function (lane) {
    var cal = this.creator;
    if (isc.isA.Number(lane)) lane = cal.lanes[lane].name;
    this.items[0].getItem(cal.laneNameField).setValue(lane);
    },

    Due to this, I guess anybody who tries to use ID or numeric value as a lane name will experience the same issue.

    Thanks in advance for any guidance,

    #2
    I have simulated the problem in "Simple Timeline" show case.
    When I changed the JS code like below,

    var developers = [
    { name: "1", title: "Charles Madigen" },
    { name: "2", title: "Tamara Kane" },
    { name: "3", title: "Darcy Feeney" },
    { name: "4", title: "Kai Kong" },
    { name: "5", title: "Shelly Fewel" },
    { name: "6", title: "Garret Monroe" }
    ];

    and the taskData like below,


    var events = [

    {
    eventId: 1,
    name: "Add new Timeline view",
    description: "Add a new calendar Timeline component",
    startDate: isc.DateUtil.getStartOf(new Date(_year, _month, _start + 2), "D"),
    endDate: isc.DateUtil.getEndOf(new Date(_year, _month, _start + 8), "D"),
    lane: "3"
    },

    I don't see tasks in the Timeline Calendar any more.

    Comment


      #3
      We see no issues testing this - if we alter the simpleTimeline sample, and it's data, as you suggest, we see a single event in the third lane, from 7/5 to 7/11, which is correct.

      It's possible you might see issues like you report if the "name" attribute you apply is actually a number, like 1, as opposed to "1".

      Comment


        #4
        One thing to be sure of is that you click "Try it" for *both* of the panes that you change - that is, for the tasks-data change, and also for the sample-source change

        Comment


          #5
          Dear Isomorphic,
          Thank you your guidance, I think I didn't know I have to click "try it" after changing taskData also.

          Comment

          Working...
          X