create new tag
, view all tags

Feature Proposals » Support updatefromtemplate parameter in edit and save scripts


Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
AcceptedProposal PeterThoeny AcceptedBy7DayFeedbackPeriod 2012-08-08     KampalaRelease

Edit Form

DateOfCommitment:   Format: YYYY-MM-DD


We want to publish particular pages from the HrDev web once they have been edited and signed off.

However we want to publish these pages to another TWiki web so that we can track published releases. Also employees can use diff to see differences between published versions of the pages to quickly bring themselves up to date on changes and optionally annotate/ask questions on the pages in a special annotation section.

Ideally the "publishing" process should take a copy of the current page in one web (HrDev) and copy it into another web (Hr). This copy should produce an exact duplicate of the original (HrDev) page including text, metadata, attachments, form .... as the most recent copy of the page in the target web.

Description and Documentation

This can be partly implemented now as a button:

Adding the code:

<form action="%SCRIPTURL{save}%/Hr/%BASETOPIC%" method="post">
<input type="submit" class="twikiSubmit" value='Publish to Hr Web' />
<input type="hidden" name="templatetopic" value="HrDev.%BASETOPIC%" />

works by making Hr/%BASETOPIC% a copy of HrDev.%BASETOPIC%, but only if the target, Hr/%BASETOPIC%, doesn't exist. If the target page exists, the save script ignores the templatetopic.

I propose adding a 'updatefromtemplatetopic' option for the save script to allow it to use the templatetopic to update the currently existing target page at %SCRIPTURL{save}%/Hr/%BASETOPIC% (or potentially some other page if %BASETOPIC% is replaced with another name).

Notes from IRC that spawned this feature request:

(10:07:48 PM) PeterThoeny: i have read your question but do not fully understand 
(10:10:25 PM) PeterThoeny: ah, if you want to update a topic once it exists, the templatetopic does not work 
(10:10:52 PM) PeterThoeny: in this case you need to supply the full text as a parameter named "text" 
(10:14:02 PM) PeterThoeny: i just read the source code og save an re-read your suggestion 
(10:14:33 PM) PeterThoeny: yes, the save script ignores the templatetopic parameter if the topic exists 
(10:15:34 PM) PeterThoeny: and, yes a new flag could be introduced to force the use of the templatetopic parameter 
(10:16:57 PM) PeterThoeny: please submit a feature request in the codev web on twiki.org 
(10:17:44 PM) PeterThoeny: the updatefromtemplatetopic flag should also be implemented for the edit script to make it orthogonal




-- Contributors: JohnRouillard - 2012-08-09


I support this feature request.

-- PeterThoeny - 2012-08-09

Feature proposal is accepted by 7 days feedback period.

-- PeterThoeny - 2012-08-17

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2013-10-11 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.