Since ConfiForms version 2.1.0 (Release Notes#Version2.1.0) there is a new IFTTT action available at your dispatch which helps you to setup audit for your ConfiForms data.
The action is called "Audit" and fully automated
Image Added
You can set it up to run onCreated. onModified and onDeleted (as any other IFTTT action)
You can set it up to run for every event or to execute conditionally, by setting up condition parameter
When an audit action is executed it creates a new record in a form named as <formname>_log. Where <formname>_log is constructed from the name of your form, followed by _log
A reference to related record is created and is stored in a field called _ref. This field is of type "Smart dropdown" and contains a reference to original record.
You can build you own views over the data stored in the audit _log forms. These forms contains all the fields your original form has in addition to dynamically added _ref field
From version 2.5.2 you can also access _event field from your audit _log forms, which has the value for the event corresponding to the audit log record
Example: Form is called "myform"
ConfiForms Form Definition |
---|
|
myformconfluence-administratorsINLINE
field1Text Fieldtext checkbox1Checkbox fieldcheckbox AuditonCreated
AuditonModified
|
Records stored in "myform"
ConfiForms TableView |
---|
|
id field1 checkbox1 |
Records stored in the "myform_log"
Records stored in "myform" with changes log
ConfiForms ListView |
---|
|
Current data in myform | Change log |
---|
| _ref:[entry.id]myform_log
|
|
Source code - here the same form is called "myform1"
Expand |
---|
Code Block |
---|
<ac:structured-macro ac:macro-id="55c045eb-8605-4e86-b479-c3ec450952c6" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">myform1</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="113162a5-0ee9-4a65-bc58-972fb56c15a4" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="formName">myform1</ac:parameter>
<ac:parameter ac:name="restrictions">confluence-administrators</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="7fc2c229-f082-4ac4-a19f-6cd0a763ee20" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">field1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Text Field</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="1e4f696c-b671-4f95-b484-f2d649701256" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">checkbox1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Checkbox field</ac:parameter>
<ac:parameter ac:name="type">checkbox</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="ac61f9f8-6c12-44bf-982c-a959d3036441" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Audit</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="f8793924-014e-4e97-8ab5-498ab6646093" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Audit</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<h2>Records stored in "myform1" </h2>
<ac:structured-macro ac:macro-id="6d2e5121-b2ff-4c60-ad69-47a55950a663" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">myform1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="acdd3611-92bd-4900-ba70-42aae97d9578" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">id</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="2cf79c31-853a-493e-94b9-22cf8a0432e7" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">field1</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="35663800-2b2d-4bde-b7c3-8081f8bdf97a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">checkbox1</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<h2>Records stored in the "myform1_log"</h2>
<ac:structured-macro ac:macro-id="d673d50a-4981-4098-af5f-20466de71f9a" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">myform1_log</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<h2>Records stored in "myform" with changes log</h2>
<ac:structured-macro ac:macro-id="537fc075-30fb-4279-9fb0-75bcab04d2ef" ac:name="confiform-list" ac:schema-version="1">
<ac:parameter ac:name="formName">myform</ac:parameter>
<ac:rich-text-body>
<table class="wrapped">
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<th>Current data in myform</th>
<th colspan="1">Change log</th>
</tr>
<tr>
<td>
<div class="content-wrapper">
<p>
<ac:structured-macro ac:macro-id="c416ddfb-cefa-4159-9fb5-d8c156196d3b" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">field1</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="9c808a18-b7f0-400a-8099-c81c112023ce" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">checkbox1</ac:parameter>
</ac:structured-macro>
</p>
</div>
</td>
<td colspan="1">
<div class="content-wrapper">
<ac:structured-macro ac:macro-id="d256c41f-6c2f-4a1e-8e7b-2434bd75e15d" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="filter">_ref:[entry.id]</ac:parameter>
<ac:parameter ac:name="formName">myform_log</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</div>
</td>
</tr>
</tbody>
</table>
</ac:rich-text-body>
</ac:structured-macro> |
|