Commit mesages

Can the commit messages (the ones that are generated when publishing the project), be read using a table component in Ignition designer? (to present them to the user)

+1

I would like to do this also. It would be nice to have a “Change Log” that could be displayed in the clients using the commit messages.

Currently the only way you can access the commit messages is from the gateway-> configure->configuration->Projects->(project name) view->Project Details (project name). On this page there is a table displaying all save/published made on a project, as well as commit messages. There is currently no other way to access these messages at this time.

Challenge accepted!!!

This module provides script and function access to a projects change history. The script uses keyword invocation. The function is only client and designer scoped, as are the scripts

system.project.getProjectHistory(projectName, editCount, editDate)
Description
Queries the gateway for project change records
[color=#008040]This function uses keyword invocation[/color]
Syntax
Parameters
[color=#0000FF]String[/color] projectName The name of the project to query for project change records. Defaults to the current project will be used
[color=#0000FF]Long[/color] editNumber Returns project records since this edit number. Defaults to 0
[color=#0000FF]Date[/color] editDate Returns project records since this date. Defaults to the epoch date
Returns
Dataset
Scope
Client
Designer

Script Example

system.project.getProjectHistory()

Function Example

getProjectHistory("ue9",0,dateArithmetic(now(),-10,"year"))

Wow, thats really cool Kyle! And fast!
Really great example of what can be done with the module SDK.
I will install it as soon as i have a chance.

Interested in some work writing a communications driver?

Updated module

Last one had a conflict between the function and the script.
Also, this one is compiled to Java 6, the previous was compiled to Java 7.

I would like to move the dataset that is provided by the function / script into a database table, so that i can do some basic querying / sorting out of data (for example translate headings / only show publishing (not saving), etc…).

I guess the way to go is to have a gateway script moving the dataset into a database table. Does anyone have example code of moving a python dataset to a SQL table?

Done. I have rewrote the module to listen for project updates, and store the project updates to a database table. As an added bonus, if the datasource is a MySQL DB, it will also store the project diff, which can be used for point in time recovery to an old instance of a window.

On a related topic, because of this functionality, I will be removing the script and function portions of the module. All access will be done via database queries now.

Ok, here we go

I have deleted the expression function entirely.
The scripting access still exists, and I have added a new method

system.project.getProjectId(String projectName)
This will return the internal projectId for a given project name.

The module can now insert project change records into a database
Also, the module now has some gateway settings
Enabled - Enable or disable the database portion of the module
Data Source - The datasource to store the records to
Table Name - Name of the database table. This will be created automagically
Store Project Data - Stores the .proj file to the database for that given change record. Staging records store the diff, the part of the project that was changed on that save. Published records store the whole project. This allows easy rollback to any project version. This functionality is currently only available on a MySQL server.

Note that the module will not fetch and insert old change records, only new records from the time of install.

Let me know how it works. I’m here to help if needed.

I am using your “Kymera Project Change History Script/Function” version 1.6.0 (b141) on Ignition 7.6. We are getting ready to upgrade to 7.7. Can you recompile this module for me so I can continue to use it on 7.7?

Here is the module updated for 7.7.
kymera-project-history-1.7.0.148-signed.modl (31.3 KB)