Allow configuration of splitting into directories of scheduling extension



  • Hello,

    I reached out before about the issues I see with storing schedules in a git repository. After some thought, I came up with a solution for a small extension, triggered on startup and CRUD operations to the schedule to maintain an additional entity type that removes data about nextRun, etc.

    Now that I have done that, I need to add schedules to my .gitignore, but with v3, a new option has been added to allow entities to be split up into multiple files, making it challenging to add to a .gitignore file for this. I was wondering if it's possible to make the option splitIntoDirectories configurable for the scheduling extension. I'm not sure if this would have any repercussions, although I believe not since manipulation of the entities is always done through the API.

    Thanks!



  • You can go with this in your extension

    reporter.documentStore.on('before-init', () => {
        reporter.documentStore.model.entitySets.schedules.splitIntoDirectories = false
      })
    

    Or put all your schedules into a single folder and gitignore that.

    It is a bit sad. The idea to put schedules into dedicated folders was introduced to make it easier to version. Could you share somewhere or email me your extension code? This idea looks reasonable, but I would love to see your approach as well.



  • Oh okay I didnt think to do that. Duh! Thanks!

    I'll respond in the other thread since it is a bit more relevant there.


Log in to reply
 

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