Skip to content
Snippets Groups Projects
Commit a028cdca authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Add hidden comments column to items table

Column not visible but searchable.
Allow to search comments and TAG number for items imported from JIRA.
parent bb2721bf
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ def retrieve_items():
utils.format_field(item.location),
utils.format_field(item.status),
utils.format_field(item.parent),
'\n'.join([comment.body for comment in item.comments]),
] for item in items]
return jsonify(data=data)
......
......@@ -74,7 +74,12 @@ $(document).ready(function() {
var url = $SCRIPT_ROOT + "/inventory/items/view/" + data;
return '<a href="'+ url + '">' + data + '</a>';
}
}
},
{
"targets": [10],
"visible": false,
"searchable": true
},
]
});
......
......@@ -31,6 +31,7 @@
<th>Location</th>
<th>Status</th>
<th>Parent</th>
<th>Comments</th>
</tr>
</thead>
</table>
......
......@@ -80,4 +80,4 @@ def test_retrieve_items(logged_client, item_factory):
response = get(logged_client, '/inventory/_retrieve_items')
items = response.json['data']
assert set(serial_numbers) == set(item[4] for item in items)
assert len(items[0]) == 10
assert len(items[0]) == 11
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment