Untuk organisasi yang menggunakan Timesheet dan Anggaran Asana, pelaporan berkala sangat penting untuk akuntansi dan penggajian yang akurat. Meskipun Asana menyediakan tampilan dalam aplikasi yang andal, terkadang Anda mungkin memerlukan ekspor CSV komprehensif dari semua time entry di seluruh domain Anda untuk audit eksternal atau pemrosesan khusus di akhir bulan atau kuartal.
Artikel ini menjelaskan cara menggunakan Asana API untuk menggabungkan entri waktu dari seluruh Ruang Kerja Anda dan memformatnya menjadi CSV yang rapi dan siap untuk akuntansi yang sesuai dengan persyaratan internal Anda.
Catatan
Meskipun panduan ini disesuaikan untuk pengguna pengaya Timesheet dan Anggaran, metode ekspor berbasis API ini juga tersedia untuk pengguna non-pengaya yang mencatat waktu melalui bidang tugas standar Asana.
Meskipun UI Asana menawarkan dasbor yang andal, dengan mengekspor melalui API, Anda dapat:
Untuk memastikan kompatibilitas dengan praktik akuntansi standar, skrip ekspor Anda harus menghasilkan CSV yang berisi bidang berikut seperti yang terlihat dalam ekspor tampilan peninjau Anda:
Kolom | Deskripsi |
Nama tugas | Judul tugas tempat waktu dimasukkan di log. |
Waktu (jam) | Durasi total yang dikonversikan dari menit ke jam desimal. |
Tanggal | Hari spesifik pekerjaan dilakukan. |
Pengirim | Nama anggota tim yang membuat log waktu tersebut. |
GID Tugas | Pengidentifikasi unik untuk tugas Asana. |
GID Proyek | Pengidentifikasi unik untuk proyek induk. |
Status Tugas | Apakah tugas saat ini "Terbuka" atau "Selesai". |
GID Entri | Pengidentifikasi unik untuk log waktu spesifik. |
Untuk mengekspor "semua" waktu, skrip Anda harus mengulangi proyek Anda untuk mencari Tugas, lalu mengambil entri waktu untuk tugas tersebut menggunakan titik akhir Dapatkan entri pelacakan waktu untuk tugas.
Pythonimport asanaimport pandas as pd# Inisialisasi Klienclient = asana.Client.access_token('YOUR_PERSONAL_ACCESS_TOKEN')workspace_gid = 'GID_RUANG_KERJA_ANDA'def export_domain_time():all_time_data = []# 1. Iterasi semua proyek di Ruang Kerjaprojects = client.projects.get_projects({'workspace': workspace_gid})untuk proyek dalam proyek:# 2. Dapatkan semua tugas untuk proyektasks = client.tasks.get_tasks_for_project(project['gid'], opt_fields=['name', 'gid', 'selesai', 'completed_at', 'prioritas'])for task in tasks:# 3. Ambil entri waktu untuk setiap Tugastime_entries = client.time_tracking_entries.get_time_tracking_entries_for_task(task['gid'],opt_fields=['created_by.name', 'duration_minutes', 'entered_on', 'gid'])untuk entri dalam time_entries:# Hitung jam dalam format desimalhours = round(entry['duration_minutes'] / 60, 2)# Buat baris agar sesuai dengan templat CSVall_time_data.append({"Nama tugas": task['name'],"Waktu (jam)": hours,"Tanggal": entry['entered_on'],"Pengirim": entry['created_by']['name'],"GID Tugas": task['gid'],"GID Proyek": project['gid'],"Status Tugas": "Selesai" jika task['completed'] jika tidak "Terbuka","Tanggal Penyelesaian Tugas": task.get('completed_at', ''),"Prioritas Tugas": task.get('priority', ''),"GID Entri": entry['gid']})# 4. Simpan ke CSVdf = pd.DataFrame(all_time_data)df.to_csv('asana_time_export_accounting.csv', index=False)print("Ekspor selesai: asana_time_export_accounting.csv")export_domain_time()
Saat menjalankan ekspor ini untuk seluruh organisasi, ingatlah praktik terbaik berikut:
Catatan
Artikel ini diterjemahkan oleh AI.
Kirim umpan balik terjemahan.

These cookies are strictly necessary to provide you with certain features. For example, these cookies allow you to access secure areas that require registration and set your privacy preferences. Because these cookies are essential to providing services to you, they cannot be disabled. You can set your browser to block or alert you about these cookies, but it may cause some parts of the site to not work.
Third party trackers collect information used for analytics and to personalize your experience with targeted ads. Under the Virginia Consumer Data Protection Act, you have the right to opt-out of the sale of your personal data to third parties. You also have the right to opt out of targeted advertising related processing. You may exercise your right to opt out of the sale of personal data and targeted advertising by using this toggle. If you opt out, we will not be able to offer you personalized ads and we will stop sharing your personal information with third parties. For more information please see our Privacy Statement.
These cookies allow us or our third-party analytics providers to collect information and statistics on use of our services by you and other visitors. This information helps us to improve our services and products for the benefit of you and others.
These cookies, provided by our third-party advertising partners, collect information about your browsing habits, as well as your preferences for various features and services. They also provide us with auditing, research, and reporting to know when advertising content has been displayed and how successful the content has been. This information allows us and our third-party advertising providers to display relevant advertising content.
These cookies provide enhanced functionality, providing chat support, allowing you to more easily complete forms, personalizing content to your preferences, and selecting your communications preferences. If you do not enable these cookies, or choose to disable them in the future, that could impact your ability to use certain features.