(request, domain, case_id, case_property_name)
return json_response({
        'changes': changes,
        'last_transaction_checked': last_transaction_checked,
    })
Returns all changes to a case property
Returns all changes to a case property
Returns all changes to a case property
def case_property_changes(request, domain, case_id, case_property_name):
    """Returns all changes to a case property
    """
    case = safely_get_case(request, domain, case_id)
    timezone = get_timezone_for_user(request.couch_user, domain)
    next_transaction = int(request.GET.get('next_transaction', 0))

    paged_changes, last_transaction_checked = get_paged_changes_to_case_property(
        case,
        case_property_name,
        start=next_transaction,
    )

    changes = []
    for change in paged_changes:
        change_json = form_to_json(domain, change.transaction.form, timezone)
        change_json['new_value'] = change.new_value
        change_json['form_url'] = reverse('render_form_data', args=[domain, change.transaction.form.form_id])
        changes.append(change_json)

    return json_response({
        'changes': changes,
        'last_transaction_checked': last_transaction_checked,
    })
def case_property_changes ( request , domain , case_id , case_property_name ) : case = safely_get_case ( request , domain , case_id ) timezone = get_timezone_for_user ( request . couch_user , domain ) next_transaction = int ( request . GET . get ( 'next_transaction' , 0 ) ) paged_changes , last_transaction_checked = get_paged_changes_to_case_property ( case , case_property_name , start = next_transaction , ) changes = [ ] for change in paged_changes : change_json = form_to_json ( domain , change . transaction . form , timezone ) change_json [ 'new_value' ] = change . new_value change_json [ 'form_url' ] = reverse ( 'render_form_data' , args = [ domain , change . transaction . form . form_id ] ) changes . append ( change_json ) return json_response ( { 'changes' : changes , 'last_transaction_checked' : last_transaction_checked , } )