Closed alanbarrett closed 8 years ago
@aquilax,
Yes when called with no parameters. This function is at the API (api/) level. Although we only want "some" admins to track.
I thought you were thinking of doing this at the database level.
At the database it is... call getAdmin(NULL, NULL); or SELECT * from Admins WHERE organisation_id IS NULL;
The database procedure userTrackProject() tracks a project for a user.
Alan.
@alanbarrett yes database will save the round-trips, but on the other side deploying changes in the schema is quite inconvenient.
How do you prefer to identify the admins, which will follow the project: separate table in the database, separate field in Admins, list of id-s in the config, or any other angle, I'm missing ?
@aquilax ,
I had thought a separate table in the database. It could just be one row for each person that should track. They might not even be admins. I would have been happy to hand deploy to the Live server and test servers.
However I think you have convinced me that we could avoid any database changes by adding a new config setting (list of user ids) and some code at API level to track the project for those user ids. If the config setting is not present, it should be assumed to be empty.
Alan.
Changes in database would be fine if we had proper migrations, but since that is not the case, there is always the doubt if the update was applied or not.
Will place it in the config. :+1:
@Paulina-Rosetta who do you want to automatically follow all new projects? You and ???
@aquilax (Evgeniy) has done code for that, which we will be deploying soon.
Alan.
Just me for now. Thanks!
@Paulina-Rosetta I have now tested and deployed @aquilax 's code for this issue to the live server. So from now you should automatically be tracking new Projects (and their related tasks).
Alan.
Seems to work perfectly - thank you both
When a Project is created, automatically (for some admins) Track the Project. @Paulina-Rosetta requested this.