# Commit mesages

**URL:** <https://forum.inductiveautomation.com/t/commit-mesages/7178>\
**Category:** Ignition\
**Created:** [September 3, 2013, 12:33pm UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178 "2013-09-03T12:33:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat.stave](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pat.stave](https://forum.inductiveautomation.com/u/pat.stave)\
**Post date:** [September 3, 2013, 12:33pm UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/1 "2013-09-03T12:33:55Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [September 3, 2013, 1:49pm UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/2 "2013-09-03T13:49:05Z")

</div>

+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.

---

<div class="post-metadata">

**Author:** ![james.hunt](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@james.hunt](https://forum.inductiveautomation.com/u/james.hunt)\
**Post date:** [September 4, 2013, 12:11am UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/3 "2013-09-04T00:11:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [September 4, 2013, 8:47am UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/4 "2013-09-04T08:47:05Z")

</div>

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

```auto
system.project.getProjectHistory()
```

Function Example

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

---

<div class="post-metadata">

**Author:** ![pat.stave](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pat.stave](https://forum.inductiveautomation.com/u/pat.stave)\
**Post date:** [September 4, 2013, 11:16am UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/5 "2013-09-04T11:16:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [September 5, 2013, 7:46pm UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/6 "2013-09-05T19:46:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pat.stave](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pat.stave](https://forum.inductiveautomation.com/u/pat.stave)\
**Post date:** [September 6, 2013, 6:40pm UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/7 "2013-09-06T18:40:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [September 7, 2013, 8:55am UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/8 "2013-09-07T08:55:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [September 8, 2013, 4:28am UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/9 "2013-09-08T04:28:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![arf](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@arf](https://forum.inductiveautomation.com/u/arf)\
**Post date:** [February 2, 2015, 3:42pm UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/10 "2015-02-02T15:42:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [February 11, 2015, 8:46am UTC](https://forum.inductiveautomation.com/t/commit-mesages/7178/11 "2015-02-11T08:46:27Z")

</div>

Here is the module updated for 7.7.  
[kymera-project-history-1.7.0.148-signed.modl](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/656e379c4c41b3fc2b5ab327784c99afdb8b840f.modl) (31.3 KB)
