Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="risktable"></div>
</body>
</html>
 
var data={
    "sprint_start": "2015-12-13",
    "sprint_end": "N.A.",
    "available": [{
        "id": 5,
        "name": "Thisun H",
        "free_time": 0.0,
        "possible": []
    }],
    "assigns": [{
        "assignee_id": 6,
        "assigned_to": "Isuru P",
        "status": "OnTrack",
        "hours_per_sprint": 6,
        "limit_per_sprint": 6.0,
        "limit_per_day": 6.0,
        "tasks": [{
            "task_id": 3,
            "task_name": "Schedule Servlet",
            "project_id": 1,
            "sprint_id": "2015-12-13",
            "parent_id": 0,
            "status": "New",
            "assigned_to": "Isuru P",
            "estimated_time": 6,
            "remaining_time": 6,
            "completed_ratio": 0,
            "start_date": "2015-12-10",
            "due_date": "2015-12-13",
            "critical_task": true,
            "dependents": []
        }]
    }, {
        "assignee_id": 7,
        "assigned_to": "Manoj D",
        "status": "Risk",
        "hours_per_sprint": 6,
        "limit_per_sprint": 5.0,
        "limit_per_day": 5.0,
        "tasks": [{
            "task_id": 4,
            "task_name": "Resource Servlet",
            "project_id": 1,
            "sprint_id": "2015-12-13",
            "parent_id": 0,
            "status": "New",
            "assigned_to": "Manoj D",
            "estimated_time": 6,
            "remaining_time": 0,
            "completed_ratio": 0,
            "start_date": "2015-12-10",
            "due_date": "2015-12-13",
            "critical_task": true,
            "dependents": []
        }]
    }, {
        "assignee_id": 5,
        "assigned_to": "Thisun H",
        "status": "OnTrack",
        "hours_per_sprint": 0,
        "limit_per_sprint": 6.0,
        "limit_per_day": 6.0,
        "tasks": [{
            "task_id": 1,
            "task_name": "Redmine Connection",
            "project_id": 1,
            "sprint_id": "2015-12-13",
            "parent_id": 0,
            "status": "New",
            "assigned_to": "Thisun H",
            "estimated_time": 3,
            "remaining_time": 0,
            "completed_ratio": 100,
            "start_date": "2015-12-07",
            "due_date": "2015-12-09",
            "critical_task": true,
            "dependents": [2, 3, 4]
        }, {
            "task_id": 2,
            "task_name": "Risk Servlet",
            "project_id": 1,
            "sprint_id": "2015-12-13",
            "parent_id": 0,
            "status": "New",
            "assigned_to": "Thisun H",
            "estimated_time": 10,
            "remaining_time": 0,
            "completed_ratio": 100,
            "start_date": "2015-12-10",
            "due_date": "2015-12-12",
            "critical_task": false,
            "dependents": []
        }]
    }],
    "suggestions": [{
        "dev_id": 5,
        "dev_name": "Thisun H",
        "task_id": 4,
        "task_name": "Resource Servlet"
    }]
};
$.each(data.assigns, function(i,value) {
  var item='<div>'+'<p>'+ value.assignee_id + '</p></div>';
  $('.risktable').append(item);
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers