'Get issue list'

def get_issue_list(self, user_id=None):

    if (not user_id):
        user_id = frappe.session.user
    meta = frappe.get_meta(u'Issue')
    role_permissions = frappe.permissions.get_role_permissions(meta, user_id)
    if (not role_permissions.get(u'read')):
        return None
    issue_list = frappe.db.sql(u'select    *\n DCTB  DCTB  DCTB from    `tabIssue`    where    status    in    ("Replied","Open")\n DCTB  DCTB  DCTB order    by    modified    asc    limit    10', as_dict=True)
    for t in issue_list:
        t.link = get_url_to_form(u'Issue', t.name)
    return issue_list
