Best way to automate version history?



  • Is there some way of ensuring that various non-admin user's changes get versioned when they don't have access to the Commit button in the UI (from what I can tell that's only visible to Admin users)?

    Something like every save creates a new version?

    Or perhaps calling the commit endpoint on a schedule (with Admin credentials)?

    If the second approach is the best option, is there some sort of limit on the number of commits and does the history need to be pruned over time?

    This is for a self-hosted installation.



  • Is there some way of ensuring that various non-admin user's changes get versioned when they don't have access to the Commit button in the UI (from what I can tell that's only visible to Admin users)?

    Only the admin users can commit versions. However, you can make all users admins if you want.
    0_1708332824478_upload-6eab0292-4ddf-4bc6-b990-55c156ee0348

    Something like every save creates a new version?

    This isn't supported, you would need to wire it yourself using a custom extension implementation.

    Or perhaps calling the commit endpoint on a schedule (with Admin credentials)?

    That could work. It's a simple rest call. Check the network in F12 tool when creating a commit in the studio.

    If the second approach is the best option, is there some sort of limit on the number of commits and does the history need to be pruned over time?

    There is no limit, but it will get slower with the growing amount of commits. Every commit is a diff between the state in time and the previous commit. This means getting state of commit is applying all previous commits diffs.


    If you persist templates on the file system. You can use git to version files and use what strategy fits you the most.


    If your interest is primarily to not lose things without inspecting the exact changes. You can use a periodical template export to backup.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.