[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0alpha1-374-ga99f2c05c3
Jim Brandt
jbrandt at bestpractical.com
Wed May 6 16:52:44 EDT 2020
The branch, 5.0-trunk has been updated
via a99f2c05c3e9b10e06d77f4c73f621e4d1ce631a (commit)
via 961ed496caa351488520b99580d51ea59c80a051 (commit)
via 77006b235b1a3fa31491045bfbae597f710cab09 (commit)
via 8c347b0f13e5c9d664ec1498ba45378acf9f60c0 (commit)
via 80053c4ffcf9c20d27916d1ea822cac80c1ef622 (commit)
via ed0f2606cf352f935716282475783f6a621dee4f (commit)
via 5245dcf0e3dbbbc192452ef4d886be152ee82435 (commit)
via 3a70a45efeaac7c70f17647aa3f47d56edb56267 (commit)
via d0188c7ab4ee701810adffd1ef5e0bd36f1e35c2 (commit)
via e0dc78d5582b1e3bb9f452ea8cbb0bdbfb8559d9 (commit)
via f050917a1cfb073ef4cffec188b6e4069b6b8f35 (commit)
via bff549e8b0d7eb3e39e87ce90ec9a540a88696e2 (commit)
via 6574829b309763b32602dd36ddea802786f32c85 (commit)
via 6afd5116d55c5e790550c89131075d94c73ed6be (commit)
via 85578c03b90ea5fdeea94d9cb1529621dabbe12e (commit)
via 68fc211d0af45a3448f85c2e017323339e5a45f8 (commit)
via 6a2aaf8de84e752790955e37ea3a2b4776997763 (commit)
via c3adc2874f32f90e38baa939e17516f578907298 (commit)
via 4450e4fbb663c6a63a23190b4d1b9a3190d500b0 (commit)
via 1c4fe0e12bcf7a7b3de3c21bf4cb4c17788ba91e (commit)
via d838d318361319be2dcb5f5297894f7a6f2a4c1e (commit)
via 6715ae9f6ddd3f9ab73c66926dd15fe36d717a2b (commit)
via af58359a3a56e2770e86ffaaebe2f7df1c49ec52 (commit)
via e5ee5cc1194ff1f5da3707cf2e28692def6c1367 (commit)
via 94c54110b9d5f8d4415127f1eb5bde9df37ce611 (commit)
via d365e261c55c416a73ae5c186a2a64ece8bcd979 (commit)
via 5af4b7d4e473725646a1ab79404d2e60212aba1e (commit)
via d06c768b0b18dbe2402ae0da8a72fc9d3941e598 (commit)
via a1f5e4c120c59d431ad690a05049180ad3791852 (commit)
via a6844114878bf5fb46e3dc55a9d0c8a0d2fff132 (commit)
via 0a9492dfb3a776aa7ca636b62bb5a7907f506455 (commit)
via 34feb6c7e6ac93c30d0b9e68dba03c28b43a1f7e (commit)
via cc0ac8c77906643c031b25123d5a32bd4e92a17d (commit)
via 0e4de808199908f61d7be569f53917911eee6448 (commit)
via affb23794317986ab88643cd4ab95a1348dfdd89 (commit)
via 7aeb5e3157d35f9dfb2e00d7ef32ad5bda9a4b28 (commit)
via ab24898ae44274bb2fa9d9e0a38dee313dd3d40d (commit)
via a3a2e2efa2a60505b757747459ebd0acc0f06d0f (commit)
via 2691da38f19a6fad949af08868c0675c921f0a86 (commit)
via 9b7d350ef133328f986413a50d49343e3eec070d (commit)
via 25090b1acd5be084324774cd5dc8d2e1d1f79329 (commit)
via b2ba8052a3bb4ff787ed939d5a50c1b354bf2fdc (commit)
via abc3fbb3cddd1438ca6a8a5eb9634122da56d2b5 (commit)
via 1586afae84ddc3f90cde463d71fbc4854ac5d086 (commit)
via 3ad0de8abe736e6f97e46daf3a08f3ac00c226e7 (commit)
via eac9b1efcf30c639f79eb29dda14eb2fa113c7b8 (commit)
via 53a6306ff6ff95d33160ba6d7c4de6835f2474db (commit)
via b509a8028dfc2bc9c798e7a321fcf39ab42a24c6 (commit)
via d87f31dd70f2626a72329cdc94c2614fa3d5af73 (commit)
via 393f8b92dc28386c9d6a9a08c4cb8e6075d1f88e (commit)
via bc90ea38a5fcf7e66566de3d25733e9f88fd674a (commit)
via 91d34a84211930e5faaf3931f60cfbebbb4730a9 (commit)
via 25a55a7da96aae1308c37ddf46470451310a6557 (commit)
via 15d27b5f260724f4651826ddfcb61fcbcc10dd93 (commit)
via f29a41c64f6b4c1cdb2f4a7ef03ff6db51a8961f (commit)
via cdd22450d3a51e82942f17d36eca1a8d71e935a2 (commit)
via ee7a81b7b70f47ea00c63d259c2524fc65117d5b (commit)
via 4415ab9dbd42e4fe481ba1374ba57680ab6e7b64 (commit)
via be62d1c48251ba533ff1aa5ee667f1576bcf163b (commit)
via fc6797fd61f12054c1144feb6b3f40818734f7be (commit)
via 21199aa24cf6a87c4b83f0f8b39e69d2e512bcf7 (commit)
via eb3f756f629b4fe5cd234643a9b619356a17182f (commit)
via d372c8fc7523ba2c06883433ba4d3e41ad6b1c48 (commit)
via 98038e8940868bd982411c19331f2e37eb187b08 (commit)
via c59beec0521d4d603ac4a73cf283cc0e73091f3f (commit)
via 0087b5cfd5033b989a58516d23cf97da5fcc5aaf (commit)
via 7273a5f0f81b0d1b41d53f58889c1b0f1a4e6e71 (commit)
via 9518e4f7817584dbe114177ff5414e3e5363c7b1 (commit)
via 1038d7f760991e23e206aa288c4c25d06d3313fb (commit)
via 61f101d8da603ca20a84f640653091ad3237d7d1 (commit)
via 33577686e1a2df75173432e12779f5a819ab0e3c (commit)
via 3b18bbf7a08eead00352b61496989bbbec72ee28 (commit)
via 687f23ec36fd7adfeccfe2bc609b5de5c3330ff5 (commit)
via 68da7e499d192c6d0281bf95e07dc902c2cb0d71 (commit)
via adc4dede7140ed239fbd579cc0e1e092e4ee184a (commit)
via a88166eee53334b1b0d7412705ddaf430309e051 (commit)
via 89aa8a0b8689901ad7860da7a8b1e5dc071c53ae (commit)
via 0651d2b30611aa90c746a50e0a849963ebafc9b5 (commit)
via e526db68e3d65e5fb160eaf079fc443424deda0e (commit)
via ec1ee60516ff3117fa353cd6de519e8c7ad243e9 (commit)
via 04fa45c018e6f68c0411832f9333db73b6cfeeb9 (commit)
via a49a3b7538429dd0be2f06b9e24fa9159d150f8b (commit)
via c271c5f8351dcc529f7881b4ff32889111ea8c4d (commit)
via d449c66dd55a4bbc0912ee2ef7ea11fd2b632132 (commit)
via 1a6961fc01d25d2ac78c8aca729cb5130a82993a (commit)
via 85f1ba1073d54c449addcd6f1f73c01f22058436 (commit)
via c19125afad9d16195a9dfb202ea001176c2c3d70 (commit)
via 497a9a8b3e5859a62a9fda40cd95d2b829058590 (commit)
via 30801c2bb5aead91819c60c5af1423eb6dd65a9c (commit)
via 48157ff4b6b4c5e59951baee161166129ffd52f6 (commit)
via 9fad20c42d04a9ad0118a667bcb6ce01a1ac3868 (commit)
via 3109835f418ee5bcf748c401c2b38b18d8b90067 (commit)
via 2b06b0335df2ee7b8b58e8107079d882421e463c (commit)
via 276ba10379901e8736a3b3360c07ef8dfb2980f0 (commit)
via b91898c0f7e4f36ef3f0cb4138a8390b94c9614e (commit)
via a76b4470650c3410f3601bc714effb6d63cfc59a (commit)
via 4cdf2ee85e153511f672b0670bfef3bf0fdf5ece (commit)
via 7a27392fede7f3fef8c147cfa8de42e1fa2ed82d (commit)
via 08c1ffcac7bd3e7063ed58e7080537d45dc17e89 (commit)
via 6a348180113bc58be19ca96ba41dfa2df704c6a4 (commit)
via ea31e15ea9e2527e4655fe8b39db571141661785 (commit)
via fb480a9593c40eb6a1a38e76897225c743d165f5 (commit)
via 6c3b3f9d33a629c0fe0354530d0c084cacfcc38f (commit)
via 1e4203fd45b859f515b78478bd961e8d6a300b18 (commit)
via 165996c89d769a3058ff465cfbba0e46bb2f8053 (commit)
via 1e769efa6baa4cd593f311c384dca88e26301b19 (commit)
via e91750203b09f8774410960577ae8880e24829dd (commit)
via 9d9cf8f499353e4ee9d0d48fef18c77a3151b2e6 (commit)
via c6bda1a9af4db4c8679fe7d714400f0371098210 (commit)
via dc2b770b8d50c25544a7d0ad27e5d63aa724b2ea (commit)
via 7c323f7f69ea9bd1e068a69ad46f6687882e9dda (commit)
via 806b28653825ba94f1ba14faa807fb6a73bb347e (commit)
via 53e1063a921e273c404f6004939dab63c513b551 (commit)
from 9a7e3e2dbc51b5f82abe69a241b7431667908e81 (commit)
Summary of changes:
.gitignore | 1 +
Makefile.in | 1 +
configure.ac | 1 +
docs/initialdata.pod | 24 -
docs/tracking-rt-configuration.pod | 155 +++++
lib/RT/ACE.pm | 5 +
lib/RT/CustomField.pm | 2 +
lib/RT/Group.pm | 43 +-
lib/RT/Handle.pm | 1027 ++++++++++++++++++++++++++++--
lib/RT/Migrate.pm | 20 +-
lib/RT/Migrate/Serializer.pm | 62 +-
lib/RT/Migrate/Serializer/File.pm | 21 +
lib/RT/Migrate/Serializer/JSON.pm | 747 ++++++++++++++++++++++
lib/RT/ObjectScrip.pm | 2 +
lib/RT/Queue.pm | 14 +-
lib/RT/Scrip.pm | 10 +-
sbin/rt-dump-initialdata.in | 500 +++++++++++++++
sbin/rt-serializer.in | 28 +-
t/api/initialdata-roundtrip.t | 1171 +++++++++++++++++++++++++++++++++++
t/api/json-initialdata.t | 7 +
t/data/initialdata/initialdata.json | 11 +
21 files changed, 3719 insertions(+), 133 deletions(-)
create mode 100644 docs/tracking-rt-configuration.pod
create mode 100644 lib/RT/Migrate/Serializer/JSON.pm
create mode 100644 sbin/rt-dump-initialdata.in
create mode 100644 t/api/initialdata-roundtrip.t
- Log -----------------------------------------------------------------
commit 961ed496caa351488520b99580d51ea59c80a051
Author: Craig <craig at bestpractical.com>
Date: Mon May 4 15:56:47 2020 -0400
Add example documentation for using rt-dump-initialdata tool
diff --git a/docs/tracking-rt-configuration.pod b/docs/tracking-rt-configuration.pod
new file mode 100644
index 0000000000..3d38a714c9
--- /dev/null
+++ b/docs/tracking-rt-configuration.pod
@@ -0,0 +1,155 @@
+=head1 Tracking Changes In RT
+
+Many organizations run a test RT in addition to their production system
+so they can test changes before deploying them on their live instance.
+This approach is a great way to try things before changing production,
+but one challenge is that you need to repeat any updates you make in the
+test environment step-by-step in your production environment.
+
+The L<rt-dump-initialdata> tool included with RT provides a way to track
+these changes in your test environment and export them so you can then
+import them in your production environment. Using this tool, you can create
+new queues, groups, scrips, and even grant rights, then export all of the
+new configuration into a readable format.
+
+Note that this utility is not a replacement for traditional database back-ups.
+
+=head2 Migrating changes from test RT to production RT
+
+As described above, let's look at an example of how you would make some
+changes on a test RT server and then migrate them to a production server.
+We'll assume that the configuration information between these two
+instances is the same (same queues, groups, scripts, etc.). There are
+ways to still use these tools if there are differences, but you'll have
+the best results if they are in sync.
+
+A good first step before starting is to validate that your RT data is valid:
+
+ sbin/rt-validator --check
+
+If L<rt-validator> reports any issues, it's good to investigate and fix those
+first.
+
+Next, take a JSON initialdata dump of our in dev RT:
+
+ sbin/rt-dump-initialdata --sync --directory base
+
+This should create a new directory "base" that contains a file
+"initialdata.json" with your RT configuration. This contains
+information like queue configuration, groups, custom fields,
+scripts, etc. It does not contain ticket data, transactions,
+attachments, etc. The C<--sync> option includes the ids of
+various objects from the database to aid in finding updated
+records.
+
+Now say you want to add a new rights configuration to your "Support" queue
+and also want to create a new scrip to automate some part of the support
+process. You can make these changes on the test RT and save. Once you
+are happy with the changes, run L<rt-dump-initialdata> again to output
+the changes:
+
+ sbin/rt-dump-initialdata --sync --directory new --base base/initialdata.json
+
+For this run, C<--base> should point to the directory you created in the previous
+step.
+
+When you run it, a new directory "new" is created. The directory will have
+another "initialdata.json" file along with a "changes.json" file that only
+has the differences between the base and new RT initialdata. For this
+example our changes file will have our new queue, some rights configurations
+and the new scrip we created:
+
+ {
+ "ACL" : [
+ {
+ "GroupDomain" : "SystemInternal",
+ "GroupType" : "Everyone",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "CreateTicket"
+ },
+ {
+ "GroupDomain" : "SystemInternal",
+ "GroupType" : "Everyone",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "ReplyToTicket"
+ },
+ {
+ "GroupDomain" : "RT::Queue-Role",
+ "GroupType" : "AdminCc",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "CommentOnTicket"
+ },
+ {
+ "GroupDomain" : "RT::Queue-Role",
+ "GroupType" : "AdminCc",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "SeeQueue"
+ },
+ {
+ "GroupDomain" : "RT::Queue-Role",
+ "GroupType" : "AdminCc",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "ReplyToTicket"
+ },
+ {
+ "GroupDomain" : "RT::Queue-Role",
+ "GroupType" : "AdminCc",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "CreateTicket"
+ },
+ {
+ "GroupDomain" : "RT::Queue-Role",
+ "GroupType" : "AdminCc",
+ "ObjectId" : "Support",
+ "ObjectType" : "RT::Queue",
+ "RightName" : "ShowTicket"
+ }
+ ],
+ "Queues" : [
+ {
+ "CommentAddress" : "",
+ "CorrespondAddress" : "",
+ "Description" : "",
+ "Lifecycle" : "default",
+ "Name" : "Support",
+ "SLADisabled" : 1,
+ "SortOrder" : 0
+ }
+ ],
+ "Scrips" : [
+ {
+ "CustomCommitCode" : "",
+ "CustomIsApplicableCode" : "",
+ "CustomPrepareCode" : "",
+ "Description" : "On Support Request Do Something",
+ "Queue" : [
+ {
+ "ObjectId" : "Support",
+ "SortOrder" : 18,
+ "Stage" : "TransactionCreate",
+ "id" : 37
+ }
+ ],
+ "ScripAction" : "User Defined",
+ "ScripCondition" : "User Defined",
+ "Template" : "Blank"
+ }
+ ]
+ }
+
+
+You can now apply the changes.json initialdata to your production RT:
+
+ sbin/rt-setup-database --action insert --datafile new/changes.json
+
+The output is JSON, so is human-readable. You can view the contents to
+confirm it contains what you expect before running against your
+production instance.
+
+=cut
commit a99f2c05c3e9b10e06d77f4c73f621e4d1ce631a
Merge: 9a7e3e2dbc 961ed496ca
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Wed May 6 16:44:41 2020 -0400
Merge branch '5.0/dump-and-merge-initialdata' into 5.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list