Commit graph

89 commits

Author SHA1 Message Date
Henrik Levkowetz 953d639ae3 Merged in Ole's submit-time draft replacement information work, as tested and updated by Robert and Adam.
- Legacy-Id: 9829
2015-07-20 14:53:20 +00:00
Suresh Krishnan 5b96bbc162 Don't allow submission for drafts that have been replaced. Fixed #1619. Commit ready for merge
- Legacy-Id: 9796
2015-07-18 14:23:40 +00:00
Robert Sparks 02a9da52a1 Manually moved the concepts forward. Reworked some presentation. Working enough to bring testers in at Sprint93
- Legacy-Id: 9717
2015-07-13 21:09:39 +00:00
Henrik Levkowetz 625347cd2f Merged trunk@9354 to facelift copy
- Legacy-Id: 9357
2015-04-02 06:51:34 +00:00
Henrik Levkowetz 58810b327d Don't set email addresses created for submitted drafts to active any more.
- Legacy-Id: 9167
2015-03-08 13:22:29 +00:00
Ole Laursen d0999c8b5e Merge facelift-r8510 branch with trunk. The IPR tool still has some non-facelifted parts and ideosyncracies. Fix a couple of minor bugs (including infamous empty licensing choice) in the IPR code, and port the IPR views to use the render shortcut.
- Legacy-Id: 8896
2015-01-22 17:38:05 +00:00
Henrik Levkowetz 0db48f3db0 Merged in [8840] from rjsparks@nostrum.com:\n Automatically ensure Alias records exists when Person records are changed, relieving multiple code locations of that responsibility. Fixes bug #1550.
- Legacy-Id: 8873
Note: SVN reference [8840] has been migrated to Git commit b0b3a31b10bb35eb00d29f27d75d21c3cc4edc4e
2015-01-20 22:32:01 +00:00
Lars Eggert a4daf2630c Merge branch 'lars/5.6.3-facelift' into lars/5.6.4-facelift
Conflicts:
	ietf/doc/templatetags/ietf_filters.py
	ietf/doc/views_charter.py
	ietf/templates/doc/charter/edit_notify.html
	ietf/templates/doc/charter/edit_telechat_date.html
	ietf/templates/doc/document_ballot_content.html
	ietf/templates/doc/document_history.html
	ietf/templates/doc/edit_notify.html
	ietf/templates/doc/edit_telechat_date.html
	ietf/templates/doc/notify.html
	ietf/templates/group/concluded_groups.html
 - Legacy-Id: 8429
2014-10-14 11:48:57 +00:00
Henrik Levkowetz 8e0200abc9 Merged in [8238] from rjsparks@nostrum.com:\n Look in the right place in the filesystem for the files bits when building reference relations during submit. Fixes bug #1467.
- Legacy-Id: 8362
Note: SVN reference [8238] has been migrated to Git commit c6e22bc429e3c77fd2d5be6d78c20a0c90cbc80b
2014-09-28 18:32:00 +00:00
Henrik Levkowetz 1c439cda48 Merged in [8236] from rjsparks@nostrum.com:\n Log what rebuild_reference_relations returns to diagnose #1467.
- Legacy-Id: 8360
Note: SVN reference [8236] has been migrated to Git commit b95b769267907f2ac8430893b153a7c82756265b
2014-09-28 17:53:02 +00:00
Ole Laursen 25625a0241 Add support for RG Chairs for pre-approving draft submissions. Also fixup the preapproval JS so it auto-focuses the draft name text input when you click one of the prefilled names.
- Legacy-Id: 7542
2014-03-25 12:14:41 +00:00
Henrik Levkowetz 870be71f79 Made ietf/submit pyflakes-clean.
- Legacy-Id: 7499
2014-03-16 08:03:15 +00:00
Henrik Levkowetz 2f274bdad8 Changed the use of non-existing variable 'ascii' to 'person.ascii'. Fixes a server failure for person alias creation during draft submissions.
- Legacy-Id: 7277
2014-02-20 12:39:34 +00:00
Ole Laursen 9457669310 Merge in changes from the old shimfree branch
- Legacy-Id: 6764
2013-11-27 12:55:50 +00:00
Ole Laursen 9f1f7790e2 Add bin/expire-submissions script for making sure old submissions are canceled automatically
- Legacy-Id: 6718
2013-11-15 16:22:29 +00:00
Ole Laursen ecf68dbb05 Revamp and clean up submit models:
- Rename IdSubmissionDetail to Submission
- Rename various submission fields to correspond to the conventions in
  the new schema
- Use a name model for the states instead of IdSubmissionStatus
- Drop the TempIdAuthor model which is based on splitting up author
  names
- Add a simple textual SubmissionEvent for tracking events in the
  lifetime of a submission
- Delete a bunch of obsolete fields
- Make sure all submission have an access key so we can depend on it
- Add state for when approval is needed from previous authors

A couple of migrations take care of transforming the
IdSubmissionDetail and moving data over/cleaning it up.

Also revamp the submit view code:

- Make form code do validation/cleaning only so there's a clear
  separation of concerns
- Reduce uses of inheritance that made the code hard to follow -
  forms now don't inherit from each other, views don't call each other
  but instead reuse common utilities, templates share CSS/utilities
  instead of relying on inheritance
- Move email rendering/sending to separate file
- Drop the in-grown terminology use (auto post vs. manual posts)
- Make the status page explain who is emailed for what purpose
- Add history table with recorded events
- Make the status page handle its post actions by itself instead of
  duplicating most of the setup logic in a number of simple views
- Fix a couple of minor bugs and handle some edge cases better
- Expand tests with a couple of more cases

Possibly the submit tool could still use more help text added to
explain the process, ideally what's explained in the tool instructions
page should be inlined or self-evident.
 - Legacy-Id: 6714
2013-11-15 13:30:32 +00:00
Ole Laursen 2daff23f02 Remove shim layer from submit code
- Legacy-Id: 6654
2013-11-05 16:59:13 +00:00
Robert Sparks b18249222b Refines Bill Fenner's regex based search through documents for references.
Populates RelatedDocument with relations for references for each type draft Document.
Replaces these reference relationships with updated copies on draft submission.
Note to deployer: This migration takes around 10 minutes to complete on a fast development laptop.
 - Legacy-Id: 6572
2013-10-30 20:51:11 +00:00
Ole Laursen 742dbace24 Move views and templatetags from idrfc/ to doc, the I-D specific views
go into views_draft.py and tests in tests_draft.py; what's left in
idrfc is wrapper code, templates and the ballot_icon templatetag
 - Legacy-Id: 6051
2013-08-14 10:32:25 +00:00
Ole Laursen 867f7a8149 Get rid of some pre-redesign dead code in submit to get rid of idrfc import
- Legacy-Id: 6047
2013-08-13 14:47:49 +00:00
Henrik Levkowetz e678659b56 Merged in a lot of shim-layer removals from olau@iola.dk
(-r5194:5465 from branch/iola/shimfree).  Copying relevant
commit messages here:

  - Removed .related many to many relationship, it's not really useful
    since we always have to restrict on the relationship type anyway,
    instead add two helpers for doing the necessary queries (in both
    directions)

  - Added migration for transforming the .desc on the new_revision events
    into something more akin to what is actually shown in the history page

  - Added migration for blanking IESG notes that just consist of "RFC
    XXXX", these have been superfluous for some time

  - Grant stream chairs access to changing the stream on a draft

  - Hacked the format_history_text filter to be less weird, using the same
    formatting for snippets and full text, also link up legacy ballot set
    events

  - Moved the decoraters + utilities to new ietfauth/utils.py file

  - Added simple helper to Email to identify invalid email addresses (from
    legacy author entries)

  - Used new new_revision .desc format for when drafts are submitted

  - Improved the looks of the button class by adding extra contrast and a
    linear gradient. Currently the gradient is only visible in fairly
    recent browsers.

  - Rewrote draft and RFC tabs in terms of the new schema, porting
    write-up and history tabs as well

  - Fixed two bugs in RFC Editor syncing: make sure documents we don't know
    beforehand get a "draft" type and make sure individually submitted
    drafts get the type="individ" group instead of NULL

  - Made the CSS-styled button feel a bit nicer to use by flattening the
    active state, also introduce some temporary styles until browsers
    catch up with the standard syntax

  - Added migrations for fixing 1) a dummy RFC entry, 2) three stand-alone
    RFCs that didn't get their doc.type set, 3) a big bunch of historic
    stand-alone RFCs that have doc.group=None - set these to the
    individual submission "none" group for the time being so the view code
    doesn't have to deal with a special case.

    In some cases this is wrong since there actually was a WG associated
    but unfortunately fixing them properly requires detective work
    (probably parsing the RFCs) and in at least some cases recreating
    historic WGs. In case someone ends up doing this, the documents to
    check can still be found with

    Document.objects.filter(name__startswith="rfc", group__type="individ")
    since there are almost no new RFCs that didn't went through the I-D
    process.

  - Merged the I-D and RFC views by showing I-D information on RFCs too.
    I-Ds that have been published as RFCs redirect to the RFC URL. Also
    support alias URLs so e.g. /doc/bcpXXXX redirects to /doc/rfcXXXX.

  - Fixed revision augmentation so events after RFC publication gets a "RFC"
    designation

  - Fixed a bug with tabs not using provided name but rather doc.name

  - Displaying draft-iesg state rather than doc.friendly_state as IESG state,
    also show a notice that the IESG state refers to post-RFC processing
    if it does, like the old separate RFC page did

  - Fixed the RFC number doc.note migration to catch combined "RFC XXX; BCP
    XXX" notes too, use the opportunity to remove inserted HTML tags from
    notes and rely on linebreaksbr filter instead (the other thing was a
    left-over from the Perl days), update the various uses of the note to
    reflect that

  - Refactored slightly to make views_doc.py independent of other idrfc code

  - Moveed idrfc/views_doc.py to doc/ with associated templates, replace the
    somewhat fragile simple URL tests for views_doc.py with ordinary unit
    tests. The new tests are still fairly basic but at least test more
    than the URL tests did.

  - Made sure RFC's (and BCP/STD/FYI) are stored as RFC123 instead of
    RFC0123 in the alias table with a new migration and a change to the
    RFC Editor sync, this in turn makes /doc/std1/ do the right thing

  - Now /doc/std1/ works, we can actually do a local link in
    urlize_ietf_docs rather than linking to the tools.ietf.org server

  - Fixed history text formatter: sanitize HTML before adding linebreaks and
    non-breaking spaces, this cuts the time to render a history page with
    long comments in half

  - Added a test crawler that walks through the crawlable part of the site,
    reporting errors and slow pages

  - Got rid of initial "No record" positions when showing old positions,
    it's just noise

  - Added a .select_related() to the document main tab to reduce the number
    of DB queries, unfortunately it seems it doesn't really help with
    Django 1.2.x due to a bug (Document inherits from DocumentInfo which
    makes things a bit more complicated)

  - Introduced a simple cache in doc.get_state so repeated reads don't
    cause a DB query

  - Cleaned up the search code in preparation for removal of the shim-layer;
    use a static button and don't send extraneous GET parameters

  - Removed dead code in several places
 - Legacy-Id: 5830
2013-07-15 20:55:24 +00:00
Henrik Levkowetz fb68f35ca3 Remove keyword argument which isn't understood by log()
- Legacy-Id: 5757
2013-05-23 17:58:01 +00:00
Henrik Levkowetz 90fe3989ee Changed which email addresses the submission tool uses for confirmation emails and sending out full submission status URLs from the emails found in the submitted document (which could be empty, broken, or intentionally different than the original authors) to the author emails from the previous version, where a previous version exists. This fixes breakage which can occur when no valid email addresses can be found in a broken submission, and also ensures that at least one of the authors of a previous version signs off on a new version, preventing submission hijacking.
- Legacy-Id: 5650
2013-04-15 22:12:31 +00:00
Henrik Levkowetz 2f3476690f In order that document states (which may be used by old documents) should not need to be removed when state machines change and states go out of use, all document states have a 'used' field. The code which accesses the state fields have not been requiring that used=True for the states returned, which is an error. Fixed this by adding 'used=True' to all State.objects.get() and State.objects.filter() call where it's relevant.
- Legacy-Id: 5486
2013-03-05 23:24:41 +00:00
Ole Laursen f85ce040a6 Use new new_revision .desc format for when drafts are submitted
- Legacy-Id: 5212
2013-01-16 14:37:50 +00:00
Henrik Levkowetz 1fbcd783f3 Merged branch/iola/statesync up to @5118 to trunk.
- Legacy-Id: 5147
2012-12-20 20:32:03 +00:00
Ole Laursen c20a5f6bf0 Convert the submit tool to associate RGs and IAB with drafts instead
of assigning them to individual submission, this is not a complete
overhaul but at least basic support so submission works and doesn't
say WG when it means RG.
 - Legacy-Id: 4910
2012-10-10 16:15:09 +00:00
Ole Laursen 33baa215b8 Send new draft revision notifications to iab-stream@iab.org as per
IABs request
 - Legacy-Id: 4889
2012-10-03 08:52:24 +00:00
Ole Laursen 444a57a266 Notify iab@iab.org rather than the IAB Chair on new versions of IAB
stream drafts
 - Legacy-Id: 4867
2012-09-20 10:42:55 +00:00
Ole Laursen 513c2bcf4c Handle IANA Review state intelligently upon draft submission, email
IRSG/ISE/IAB on uploads to alternate streams, email RFC Editor in case
a draft under publication has a new upload
 - Legacy-Id: 4855
2012-09-17 16:06:21 +00:00
Henrik Levkowetz 40081edc27 Don't try to add a ballot's AD email addresses to a new version notification email if there's no ballot. Also did some linguistic fixes, and got rid of a wildcard import.
- Legacy-Id: 4809
2012-08-24 08:49:32 +00:00
Robert Sparks 87ebddd0ba Simplified access to current BallotDocevent from a Document.
Added functions to BallotDocEvents to faciliate access to BallotPositionDocEvents, both for all positions, and current AD postions.
Updated the moderator package to use the Documents from _agenda_data.
Added a filter to assist with rendering the moderator package.
Fixed a bug where different functions in idrfc/views_ballot were using log_state_changed expecting different implementations (a cleanup task should reconcile the _three_ implementations in the codebase of that function).
 - Legacy-Id: 4768
2012-08-17 20:45:32 +00:00
Robert Sparks fb2b9c9e6c Removed some duplication between doc/util and doc/models by moving things into doc/models. Fixes bug #857
- Legacy-Id: 4750
2012-08-02 21:36:36 +00:00
Robert Sparks da3e916f72 Moves the prefix for the URI to use for rfcdiff into settings.py.
Fixes bug #808
 - Legacy-Id: 4701
2012-07-28 20:19:36 +00:00
Henrik Levkowetz 6bc68a9a51 Behave slightly more gracefully if a submission has already been moved into place, and we're asked to do it again.
- Legacy-Id: 4548
2012-06-28 19:22:59 +00:00
Ole Laursen ed96cee2e4 Add listing of recently approved drafts to approval page by request
from Barry Leiba.
 - Legacy-Id: 4420
2012-05-14 18:21:34 +00:00
Ole Laursen 188c0846d0 Add approval/pre-approval page for Secretariat and WG Chairs, with
subpages for adding and canceling pre-approvals and a set of
migrations for replacing the old IdApprovedDetail with a slightly less
confusing Preapproval model.
 - Legacy-Id: 4411
2012-05-10 18:07:59 +00:00
Ole Laursen 0bc71c7146 Fix problem with concurrent posts as reported in #813 by preventing
accidentally submitting a post twice (with Javascript) and modifying the
move-old-files-to-archive code to not move the files away if they
belong to the same submission as the one we're accepting (this
mitigates a concurrent post to at least not end up with a non-existing
draft).
 - Legacy-Id: 4112
2012-03-16 17:22:33 +00:00
Ole Laursen e7cf907c94 Only set state "WG Document" on revision 00 documents, fixes problem
with overwriting manually set WG states when a new version is
submitted. Fixes #797.
 - Legacy-Id: 4074
2012-03-12 12:08:48 +00:00
Ole Laursen 117eac031a Be a bit more careful with handling the submitter info as well as it
turns out there are some (although apparently all old) entries with
author_order = 0
 - Legacy-Id: 4015
2012-03-01 18:06:38 +00:00
Ole Laursen 3ebee25c2a Handle users without a profile gracefully
- Legacy-Id: 4014
2012-03-01 17:47:02 +00:00
Ole Laursen 08a3ec7687 Work around problems if a document has two authors connected who's the
same person (fix the data issue rather than throwing an exception)
 - Legacy-Id: 4013
2012-03-01 17:18:37 +00:00
Ole Laursen 0144bcd05b Only set wg-doc on WG documents
- Legacy-Id: 3980
2012-02-26 21:32:24 +00:00
Ole Laursen cb1b56d912 Fix bug if we weren't able to deduce a stream
- Legacy-Id: 3979
2012-02-26 14:22:44 +00:00
Ole Laursen f05bc8cf1f Add "Assigned to area" select box to individually submitted documents
in the AD edit form, change search to define area = doc.group or
doc.group.parent (so don't take AD into account), plus a bunch of
small tweaks to make a document with an area set as group behave like
an individually submitted document, at least for the time being (they
are presented as "Individual in xyz area" on their document page)
 - Legacy-Id: 3968
2012-02-25 01:48:33 +00:00
Ole Laursen 480cb04cd6 Save announcements generated by the system as Messages, adding an
extra relation to be able to associate a draft with the message
 - Legacy-Id: 3917
2012-02-08 21:05:28 +00:00
Ole Laursen 980d4e6444 Move new schema models from redesign/ to ietf/
- Legacy-Id: 3855
2012-01-24 17:17:24 +00:00
Ole Laursen 819395928e Be more conservative in estimating the stream, for individual
submissions we should not set a stream but let it be decided later on
 - Legacy-Id: 3853
2012-01-24 13:19:25 +00:00
Ole Laursen 252513679d Don't assign independent IETF submission to the ISE stream
- Legacy-Id: 3845
2012-01-20 18:45:30 +00:00
Ole Laursen 923239a5dc Clean up old draft files when submitting a new draft
- Legacy-Id: 3811
2012-01-13 16:38:00 +00:00