If you work with student representation and influence through the student unions, or with employee representation through the trade unions, you are often entitled to prolongation corresponding to the time spent on such tasks.
You should document time spent on representation work in your ISP. There is a lot of variance in how this prolongation is handled by different universities and departments. You should ask those in charge of doctoral education about it.. The Association of Swedish Higher Education Institutions (SUHF) has recommendations about prolongation for student representation – these are non-binding but you can bring them up if your department does not have a system.
You should be aware that some departments or universities cap the number of days you can dedicate to such tasks, thus capping the number of prolongation days you can receive.