Update information inserted through a template automatically
Asked by Mircea Marin:

Hi,

I have the following scenario: we are using Confluence to write requirements and for that we created some templates. In these templates we have the information for each specific requirement entered in a table like this:

|      SRS Title       |                                 \<name of the item\>                                 |
|  Unique Identifier   |                                (Base identifier)-S-#                                 |
|  Parent Identifier   |       \<identifier of linked Parent: URS, PFRS, another SRS, Risk Mitigation\>       |
|  Risk Mitigation ID  |         \<Identifier of the applicable Risk Mitigation (only one or none)\>          |
|  Applicable License  |                                         None                                         |
|     Description      | \[if \<condition\>\] The system shall \[enable the user to\] \<perform the action\>. |
|        Owner         |                                  \<feature owner\>                                   |
|    User Interface    |               \[The feature shall be accessible via \<UI control\>.\]                |
| Applicable standards |                          \[DICOM, IHE (refer to chapter)\]                           |
|   Quality aspects    |                              \[Usability, Performance\]                              |
|  Included in manual  |                                          No                                          |
|----------------------|--------------------------------------------------------------------------------------|

For each new requirement the feature owner creates a new copy of the table and enters the information in it.

My question is if there is any way to automatically update this table's structure (not content) **in the already created pages** in case we have to change something in the template.

For example, in case we decide we would need an additional attribute, we would create a new row in this table in the template. We would then have to manually update all the places where the table is already filled in and this is a painstaking process.

Thanks!


Answers:
author: Stephen Deutsch
body: Hi Mircea,

One option you would have is to use the Confluence Command Line Interface and do a search and replace on the XHTML format. You would use the Header right after where you want to insert the new row as a reference. For example, if you wanted to put a new row in before "Owner" you would search for "\<tr\>\<th colspan="1"\>Owner\</th\>" and replace with "\<tr\>\<th colspan="1"\>New heading\</th\>\<td colspan="1"\> \</td\>\</tr\>" or something similar to that. You can see the XHMTL code with the "Tools", "View Storage Format" or use the [Confluence Source Editor](https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor). You could do a test on a test page to make sure it works without messing up your pages, and then you would do it to all pages.

comments: author: Mircea Marin
body: I didn't know about the Confluence Source Editor. With that I can update pages easily now. Unfortunately I can't buy the CCLI tool (no approval from higher up).Thanks!


Tags: confluence-administration