Commit graph

134 commits

Author SHA1 Message Date
Henrik Levkowetz 5573dc00d0 Find person by email during draft submission also if email case doesn't match.
- Legacy-Id: 14723
2018-03-02 21:27:13 +00:00
Henrik Levkowetz 26bf387356 Replaced direct assignment to m2m fields with .clear() and .set()
- Legacy-Id: 14666
2018-02-21 23:58:25 +00:00
Henrik Levkowetz 4695ec5383 Restricted automatic IANA state change into 'Version Changed - Review Needed' on new draft revisions to events before document approval, based on conversation with Michelle.
- Legacy-Id: 14486
2018-01-04 12:31:05 +00:00
Henrik Levkowetz 130261e781 Removed some debug statements.
- Legacy-Id: 14242
2017-10-30 12:28:51 +00:00
Henrik Levkowetz 7edb4da711 Added draft URLs pointing to Yang resources (impact analysis and model metadata) for submissions containing Yang modules.
- Legacy-Id: 14237
2017-10-30 11:30:01 +00:00
Henrik Levkowetz ac69d9889d Added a guard against feeding int() a non-numeric string during submission confirmation and a log assertion to report same.
- Legacy-Id: 14202
2017-10-10 15:02:00 +00:00
Henrik Levkowetz 2c1438c240 Moved unidecode_name from utils.text to person.name.
Modified UserFactory to use a new locale for each new user, instead of the
same locale for a whole test run.  This (almost) ensures the exercise of
code to deal with non-ascii names, something which would not happen if a
locale with ascii names was chosen at the start of a run.

Modified name.initials() to not use non-word characters as initials.

Modified unidecode_name() to do more normalization, to conform to the
conventions used in internet-drafts.

Added saving of the factory-boy random state in order to be able to re-run
a test suite with the same pseudo-random sequence as in a previous failed
run.

Fixed an issue with email formatting in test_api_submit_ok().

Modified the draft author extraction code to deal better with names with
embedded apostrophes.
 - Legacy-Id: 14141
2017-09-20 15:36:30 +00:00
Henrik Levkowetz 33b275b04f Added ietf.utils.text.unidecode_name() and replaced various uses of unidecode() with it, in order to normalize the generation of ascii versions of names, to avoid different practices in space stripping and space normalization in different parts of the code.
- Legacy-Id: 14128
2017-09-17 15:12:18 +00:00
Henrik Levkowetz 3af2554b2f Added an API for draft submission, at /api/submit. Added an urls.py file under api/ to hold api urls, and moved those from ietf/urls.py. Refactored out many parts of the regular submission forms and functions in submit/forms.py and submit/views.py in order to re-use the appropriate parts for the submission API. Moved support functions to submit/utils.py. Added a new validation errors for missing docName in xml-based submissions. Updated the submission test document templates to use insert additional values. Added failure and success test cases for automated API submissions, and refactored some test utility functions.
- Legacy-Id: 14125
2017-09-16 09:35:42 +00:00
Henrik Levkowetz b42f1cbeb5 Replaced the use of unaccent.asciify(), which has similar functionality to unidecode.unidecode(). Changed the draft parser to work exclusively with unicode text, which both makes the removal of unaccent easier, and takes us closer to Py35 compatibility. Adjusted callers of the draft parser to send in unicode.
- Legacy-Id: 13673
2017-06-18 18:23:18 +00:00
Ole Laursen 5b677dc6ba Merge author stats branch into new branch from trunk
- Legacy-Id: 13159
2017-03-28 14:36:40 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz 814e1315b5 Added a new document tab for some documents, showing htmlized drafts and RFCs
using the htmlization code previously developed for tools.ietf.org.  As the
generation of the htmlized page is a bit too costly to do on the fly for
often-referenced drafts and RFCs, the part of each page which contains the
htmlized document is cached on file with a cache time of 2 weeks.

Changed all links which pointed to the htmlized version on tools to instead
point at the datatracker htmlized document.

Tweaked some URLs which didn't permit retrieval of intermediate-rev-charters.

Narrowed the pattern for document names to disallow dots in names, and
instead explicitly enumerated the few historical draftw with dots in the
name.

Added a file-system cache for the htmlized documents, and specified a
max_entries value for caches, overriding the default 300 entries.

Tweaked the code for new author email entries to provide a time if missing
in an updated entry.

Changed links in various email templates which pointed at tools.ietf.org
pages to instead point at datatracker pages, where appropriate.

Changed the search result rows to provide links to both the current meta-
information document pages (with a (i) info symbol) and to the new htmlized
document pages.
 - Legacy-Id: 13040
2017-03-20 14:08:52 +00:00
Henrik Levkowetz bb5096da8a Added more email validation for draft submission author emails, and blocked some baths that could lead to bad email addresses ('none') being set as document author email addresses.
- Legacy-Id: 13010
2017-03-14 14:07:21 +00:00
Henrik Levkowetz 4daf66d11c Added DocEvent rev= parameter througout the code.
- Legacy-Id: 12978
2017-03-06 15:08:21 +00:00
Henrik Levkowetz 5bb5ca727b Created a special function log.unreachable() to mark code unreachable, and changed a function name from log.affirm() to log.assertion().
- Legacy-Id: 12933
2017-02-28 20:16:52 +00:00
Henrik Levkowetz ffa19c9847 Added a log.affirm() call at the point where we may discover new flawed document author records. Fixed a place where the generation of Person.ascii from Person.name wasn't done well.
- Legacy-Id: 12903
2017-02-23 11:57:29 +00:00
Henrik Levkowetz a5290e143a Made some changes to the missing-email submission handling. This may have fixed the creation of author records containing 'none' email entries, but as I've not been able to reproduce the issue, this is uncertain. Next is to build an email notification assert statement to help capture information if this happens.
- Legacy-Id: 12898
2017-02-22 15:36:28 +00:00
Ole Laursen 90051a1575 Add support for displaying and editing author affiliation and country
when submitting a draft, replace the Submission.authors line-based
text field with a JSON field
 - Legacy-Id: 12745
2017-01-27 16:10:31 +00:00
Ole Laursen 9308948195 Add person, affiliation and country (through django-countries) to
DocumentAuthor, rename author field to email and make it optional (for
modeling old email-less submissions), remove the authors many to many
referencing field from Document as it is not really pointing the right
place.

Update the Secretariat tools to show affiliation and country.

Add migration for getting rid of the fake email addresses that the
migration script created some years ago (just set the author email
field to null).
 - Legacy-Id: 12739
2017-01-26 17:10:08 +00:00
Ole Laursen 76bcab6efc Show formal languages used on new submissions and make the field
editable, also add it to the test with a simple JSON example
 - Legacy-Id: 12662
2017-01-17 13:52:16 +00:00
Henrik Levkowetz 7f1c1e43f2 Replaced the use of plain DocEvent for submission doc events with a SubmissionDocEvent that carries rev and a FK to submission.
- Legacy-Id: 12275
2016-11-07 18:21:34 +00:00
Henrik Levkowetz 8a5593e714 When converting submission events to doc events, post them in chronological order. Don't add upload doc events until we're past the possibility of submission cancellation.
- Legacy-Id: 12097
2016-10-06 17:03:23 +00:00
Henrik Levkowetz 72cfe4cf68 Removed the creation of duplicate new revision doc events. Corrected the timestamp on approval docevents. Changed where the submission upload docevent is created, to avoid spurious events for cancelled uploads. Adjusted the person associated with some events from submitter to (System). Added tests for the sequence of events associated with a submission.
- Legacy-Id: 12072
2016-10-01 21:16:04 +00:00
Henrik Levkowetz da2c25182f Code changes to handle draft submission authors without email addresses better.
- Legacy-Id: 12063
2016-09-30 10:48:46 +00:00
Henrik Levkowetz 254c3db807 Style changes.
- Legacy-Id: 11944
2016-09-08 17:37:36 +00:00
Henrik Levkowetz 47d6bbbea3 Renamed the SubmissionEmail event class to SubmissionEmailEvent, and added an admin class for it.
- Legacy-Id: 11942
2016-09-08 15:04:53 +00:00
Mike Douglass fa3a34389e Merge forward to 6.31.1.dev0
- Legacy-Id: 11899
2016-08-31 03:00:10 +00:00
Henrik Levkowetz 4b0a9360f0 Merged in ^/branch/iola/event-saving-refactor-r10291, which refactors document saving to always use doc.save_with_history(events), and requires accompanying events. This branch also provides refactoring of recurring regexes in url patterns into a dictionary. As part of the merge, also refactored new code which didn't use the save_with_history() method.
- Legacy-Id: 11840
2016-08-23 10:52:08 +00:00
Ole Laursen 9faae5e915 Merged community list branch with trunk
- Legacy-Id: 11174
2016-05-06 17:36:04 +00:00
Henrik Levkowetz be2a2285bc Added small orange or green yang symbols to draft info- and list-pages, signifying fail or pass for the submission yang validation.
- Legacy-Id: 10994
2016-03-28 18:47:53 +00:00
Ole Laursen c061caaf04 Merge in changes from community-list-cleanup
- Legacy-Id: 10968
2016-03-23 13:31:24 +00:00
Ole Laursen c7589f9b6a Integrate community lists for groups with the existing group documents
page. Each WG/RG now gets a list with an initial set of rules to
populate the list.

Refine the community list management interface a bit to support the
group lists better - group lists aren't connected to the usual track
icons so need to be able to add/remove individual drafts.

Change the "name contains" rule to support regular expressions to
enable each group to have a default replacement for the previously
implemented "related documents" search. Maintain a materialized view
of the regexp-matched drafts with a call in the submit code to avoid
having to scan all drafts/~1000 group rules all the time.
 - Legacy-Id: 10963
2016-03-22 12:48:44 +00:00
Henrik Levkowetz 76bb233b70 Refactored draft submission checks so that new checkers can be slotted in through a configuration in settings.py. Refactored the calling of idnits to use the new API, and added a pyang validation check.
- Legacy-Id: 10894
2016-03-04 20:08:29 +00:00
Henrik Levkowetz 33b1cc312e Merged in [10780] from rjsparks@nostrum.com:
Stop making active unknown-email- objects. Mark existing such objects as inactive. Tweak exception handling in submit/utils to make it obvious that the utilities will not change the person an existing Email record is pointing to.
 - Legacy-Id: 10787
Note: SVN reference [10780] has been migrated to Git commit c8c45e2213
2016-02-06 19:44:14 +00:00
Robert Sparks c8c45e2213 Stop making active unknown-email- objects. Mark existing such objects as inactive. Tweak exception handling in submit/utils to make it obvious that the utilities will not change the person an existing Email record is pointing to. Commit ready for merge.
- Legacy-Id: 10780
2016-02-04 22:50:50 +00:00
Henrik Levkowetz 8e399de009 Don't fail submission confirmation if the login used is missing an associated person record.
- Legacy-Id: 10751
2016-01-27 13:40:23 +00:00
Ole Laursen 1c3ec64e03 Eliminate odd group_id assignment in submission code, probably left
over from a previous generation of the code. It causes trouble with a
revamped community rule engine.
 - Legacy-Id: 10730
2016-01-25 18:26:33 +00:00
Henrik Levkowetz 408d51c11f Merged in [10425] from bartosz.balazinski@interdigital.com:
Provide information about who has suggested document replaced-by information in the notification email.

    This commit fixes bug 1817,
 - Legacy-Id: 10440
Note: SVN reference [10425] has been migrated to Git commit ba39077180
2015-11-07 21:43:27 +00:00
Bartosz Balazinski ba39077180 This commit fixes bug 1817, commit ready to merge
- Legacy-Id: 10425
2015-11-04 23:25:51 +00:00
Ole Laursen e1f0917659 Summary: Add new document saving API, Document.save_with_history(events).
The new API requires at least one event and will automatically save a
snapshot of the document and related state. Document.save() will now
throw an exception if called directly, as the new API is intended to
ensure that documents are saved with both an appropriate snapsnot and
relevant history log, both of which are easily defeated by just
calling .save() directly.

To simplify things, the snapshot is generated after the changes to a
document have been made (in anticipation of coming changes), instead
of before as was usual.

While revising the existing code to work with this API, a couple of
missing events was discovered:

- In draft expiry, a "Document has expired" event was only generated
  in case an IESG process had started on the document - now it's
  always generated, as the document changes its state in any case

- Synchronization updates like title and abstract amendmends from the
  RFC Editor were silently (except for RFC publication) applied and
  not accompanied by a descriptive event - they now are

- do_replace in the Secretariat tools now adds an event

- Proceedings post_process in the Secretariat tools now adds an event

- do_withdraw in the Secretariat tools now adds an event

A migration is needed for snapshotting all documents, takes a while to
run. It turns out that a single document had a bad foreign key so the
migration fixes that too.
 - Legacy-Id: 10101
2015-09-28 14:01:03 +00:00
Henrik Levkowetz a7179d5e03 Merged in [9862] from rjsparks@nostrum.com:
Ignore suggestions that a draft replaces itself.
 - Legacy-Id: 9874
Note: SVN reference [9862] has been migrated to Git commit 6ccd96fb31
2015-07-23 12:42:49 +00:00
Robert Sparks 6ccd96fb31 Ignore suggestions that a draft replaces itself. Commit ready for merge.
- Legacy-Id: 9862
2015-07-23 08:02:26 +00:00
Henrik Levkowetz da893dad1c Merged in support of xml-source only drafts submissions from personal/henrik/submitxml/.
- Legacy-Id: 9859
2015-07-22 21:53:23 +00:00
Henrik Levkowetz d5f36911cf Added support of xml-source only drafts submissions.
- Legacy-Id: 9858
2015-07-22 21:35:44 +00:00
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