...
Auto-apply basics
To use auto-apply, follow refer to the instructions in the user manual here: Applying Amendments
...
a published version of the bill must exist, and that published version must include line numbering
the applied amendments must contain accurate clause, line, and page references
the applied amendments must consist of well-formed, valid XML
the applied amendments' instructions must be insert, leave out, or leave out and insert type amendments
the wording of the applied amendments must be correct; for example, an amendment in the form “leave out ____ and substitute ____” will fail, but “leave out ____ and insert ____” will work.
Steps
Within Lawmaker, the auto-apply process consists of the following steps:
Select which amendments to attempt to auto-apply from the Amendment Manager tab. The current status of the amendments (Draft, Submitted, Tabled, Agreed) has no impact on auto-apply; amendments at any stage in their lifecycle can be auto-applied to a bill version.
Click ‘Apply Amendments’ from the Amendment Actions menu, then select whether to ‘Create a new bill version’ or apply to an existing bill version. You can use the latter option to apply additional amendments to an already created amended copy. This gives you more control over the order in which to apply amendments, which can assist with troubleshooting or allow you to apply amendments in batches.
Lawmaker will attempt to apply the selected amendments to the bill version and a green toastie notification will appear in the top-right of the screen telling you how many were successful. You can then open the newly created amended version in the Editor.
In the Editor, successfully applied amendments will appear as red and blue tracked changes in the body of the bill, and will have corresponding numbered cards on the right-hand side of the window, in the ‘Inline Amendments’ pane. Amendments which could not be applied will appear in the ‘Review’ pane, with an error message. The Inline Amendments pane allows you to click a card and jump to the applied amendment.
Assuming you are happy with the applied amendments, you can click ‘Accept all’ on the Inline Amendments pane to apply the changes and remove the track change mark-up from the bill version. This will create a clean ‘as amended’ copy of the bill.
You can make further manual edits to the text of this version, before or after you have accepted the applied amendments, if you need to.
Known limitations and bugs
Lawmaker’s auto-apply function helps clerks speed up the process of creating ‘as amended’ versions of bills. It allows a large number of amendments to be applied to a bill version without manual intervention. However, there will always be some amendments which fail to auto-apply for one reason or anotherdifferent reasons, and will therefore require manual edits to integrate into the bill version.
If you know which amendments are likely to fail, and the manner in which they tend to fail, you will be better placed to use the auto-apply feature effectively and to avoid creating problems in the resulting bill XML. The details of the known limitations listed below should help you to manage any problematic amendments you encounter when creating an “as amended” version of a bill.
...
Amendments which ‘move’ or ‘divide’ provisions in a bill can’t be auto-applied at present. We plan to extend auto-apply to these instruction types in future. For now, you will have to apply these amendments manually.
Here is an example of an amendment tabled in the House of Commons which moves a clause to a different part of the Bill:
...
Amendments to Tables
Amendments to rows, columns, and text in specific cells in tables can’t be auto-applied. We plan to extend auto-apply to handle these instruction types in future. For now, you will have to apply these amendments manually. If you do attempt to auto-apply amendments to tables, there is a slight risk that the amendment will appear to apply successfully but produce bad XML in your bill version.
...
Amendments to the Title
Amendments to the Long Title of a bill are not currently supported and cannot be auto-applied.
Incorrect amendment wording sometimes causes amendments to be applied successfully but disappear from the
...
Editor
Amendments which are worded slightly incorrectly sometimes appear to apply correctly successfully (Lawmaker reports that shows a notification to say they were successfully applied), but when the new amended bill version is opened in the Editor the amendment is missingamendments are missing - they have not been applied to the bill text and there is no error message relating to the amendments in the Review pane.
There are two known cases of problematic amendments which suffer from this issue:
“leave out … and substitute” - amendments : Amendments which use the word ‘substitute’ in place of ‘insert’ will appear to be applied successfully but may not show up in the Editor
amendments which leave out a phrase beginning with punctuation, such as leave out “, and any other costs”, : These will also appear to be applied successfully but may not show up in the Editor
We are currently in the process of fixing the bug which prevents Lawmaker accurately reporting success and failure of auto-applied amendments such as these.like these.
Amendment instructions which end with a full-stop
Amendment instructions do not normally end with a full-stop. For example, consider the following amendment, taken from a list of amendments to a real Bill:
Clause 21, page 17, line 33, after “subsection” insert “, and may make consequential amendments of this section”
When auto-applying amendments in Lawmaker, the presence of a full-stop at the very end of the instruction can prevent the amendment from being applied. So the following amendment may fail:
Clause 21, page 17, line 33, after “subsection” insert “, and may make consequential amendments of this section”.
If you notice an extra full-stop at the end of an amendment instruction, it is worth removing it before attempting to auto-apply the amendment.
Amendments which insert or leave out a combination of sections/paragraphs and Parts, Chapters, and cross-headings
...
Info |
---|
In the bill XML, higher-level headings like Parts are not merely titles; they are XML tags which effectively ‘wrap’ (i.e. completely enclose) the provisions which are under that heading. For example, if a bill Bill contains two Parts, and Part 2 contains sections 4-6, then in the XML of that bill Bill sections 4-6 are all contained within an XML tag for representing Part 2. If an amendment were to remove an existing heading, such as Part 2, a insert a new Part after section 5 (that is, mid-way through Part 2), a slightly complex transformation would be required to wrap or unwrap the provisions under that heading in the XML, so that they are instead enclosed by Part 2. |
We plan to improve handling of these types of amendments in future. Not all amendments of this type will fail, but when using auto-apply on these amendments it is best to proceed with caution.
“From beginning to end of line…” or “leave out line…” in an amendment can sometimes create bad XML when applied
Where a line in a bill begins with a number element - i.esub-section, paragraph, or sub-paragraph exists in a bill and the content of that sub-section or paragraph extends over more than one line, any amendment which leaves out the whole of the first line of that sub-section or paragraph can create bad XML when auto-applied. This is because the amendment instruction is interpreted as though the amendment intends to remove not only the text of that line but the sub-section or paragraph number at the start of the line too - e.g. (1), (2), (a), (b), (i), (ii) - and an amendment leaves out or substitutes that whole line, the auto-applied amendment may sometimes create bad XML.
Applying a 'leave out and insert' amendment to the last words in a quoted structure sometimes results in the new words being placed after the quoted structure
If an amendment substitutes words at the end of a Quoted Structure, the new words are sometimes placed in the ‘Following text’ element after the Quoted Structure, as in the screenshot below:
...
This is a known bug which we intend to fix in an upcoming support release, (iii). This results in some of the text of that sub-section remaining in the bill but without a number, which is invalid.
This problem does not arise where an instruction leaves out the entirety of a sub-section or paragraph. In those cases, the removal of the number is correct, since the sub-section or paragraph has been left out entirely. The problem only affects amendments which remove the whole of the first line of a multi-line sub-section or paragraph, leaving behind some other textual content of that sub-section or paragraph.
We intend to fix this particular case in future Lawmaker releases.
Amendments which leave out words to the end of a line conflict with other amendments to that line
...
When one amendment leaves out the end of a section, sub-section, Schedule paragraph or sub-paragraph, and another amendment inserts words in a new provision immediately after that one, the two amendments may be deemed to be overlapping and the latter amendment will not auto-apply. Refinements to conflict-detection should help to resolve this problem in a future Lawmaker release.
Amendments which
...
Amendments which add text immediately after a tagged cross-reference will sometimes fail to apply if the newly added text begins with a punctuation mark. In other cases, they may apply successfully but the added text will appear inside the cross-reference tagging, which is wrong. This is an edge-case which we plan to fix in a future support release.
Incorrect application of amendments which leave out a particular Schedule and insert another one
An amendment in the form “leave out Schedule x and move the following Schedule--” may produce unexpected output when auto-applied: the new Schedule will be placed at the end of the bill, the omitted schedule will be marked as deleted, but the intervening schedules (between the omitted Schedule and the new Schedule at the end of the bill) will also be marked as deleted.
...
replace lines containing structure with simple text
Where an amendment leave out multiple lines of structured text (for example, paragraphs (a) and (b) in a subsection) and inserts a new simple line of text, auto-apply may produce unexpected results. The screenshots below show an example of this.
...
Currently, applying and accepting this amendment will result in the newly inserted text disappearing. We intend to fix this problem in a future Lawmaker release.
“Accept all” producing unexpected changes
Sometimes amendments are auto-applied successfully, and the deleted and inserted text all appears correctly in the new bill version in the Editor, but clicking “accept all” to consolidate those changes into your bill version produces unexpected results. We have identified the following scenarios in which “accept all” behaves unexpectedly:
...
When applying amendments such as these, it is advisable to note down the numbers and locations and re-check them after accepting all amendments.
Incorrect application of amendments which leave out a particular Schedule and insert another one
An amendment in the form “leave out Schedule x and move the following Schedule--” may produce unexpected output when auto-applied: the new Schedule will be placed at the end of the bill, the omitted schedule will be marked as deleted, but the intervening schedules (between the omitted Schedule and the new Schedule at the end of the bill) will also be marked as deleted.
Hints and tips
Create a duplicate working version before clicking “Accept all”
After auto-applying a set of amendments, and once after you have checked all the amendments which were successfully auto-applied, we recommend creating a backup copy of that working version before clicking “accept all” to consolidate them into your bill text.
...
After editing the copied amendment, you can attempt to apply it.
Planned refinements to auto-apply
User Interface improvements
Allow users to accept applied amendments one-by-one
Show more amendment information in the ‘Inline amendment’ and ‘Review’ panes in the Editor (for example, add a means of quickly viewing the amendment text)
Give users the option of generating a report when auto-applying amendments; the report would show which amendments were successfully applied, which failed and why, alongside amendment numbers, Dnums, target location, and other metadata
Functional improvements
...
Handle more complex amendments which span several XML levels
...
Implement auto-application of amendments to tables
...
Implement auto-application of Move and Divide instructions
...
Improve auto-application of amendments which begin before a Quoted Structure and end part-way through it
...
Improve handling of “leave out line” amendments
...