Commit graph

108 commits

Author SHA1 Message Date
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
Henrik Levkowetz 5159349959 Added an IESG photo page. Replaced navigation pills with a navtab on the IESG pages.
- Legacy-Id: 11277
2016-06-05 09:55:59 +00:00
Ole Laursen c061caaf04 Merge in changes from community-list-cleanup
- Legacy-Id: 10968
2016-03-23 13:31:24 +00:00
Henrik Levkowetz 174cfeafa3 Merged in [10770], [10771], [10772], and [10773] from housley@vigilsec.com:
The IESG Telechat Agenda now shows "(Has RFC Editor Note)" after the I-D
filename if there is an RFC Editor Note associated with the document.  This
was added to the html and txt versions of the agenda.  It was not added to the
Secretariat view or the Scribe view of the agenda.

For transition, when an AD edits the RFC Editor Note, they need to move the
text from the current writeup into the new field.  Returning documents on the
telechat agenda seems to be the biggest opportunity for something to fall
between the cracks.  If an event of type "changed_rfc_editor_note' exists, and
the string "RFC Editor Note" appears in the text of the most recent
'changed_ballot_writeup_text' event, then a message is shown that tells the AD
to remove the RFC Editor Note from the writeup.
 - Legacy-Id: 10783
Note: SVN reference [10770] has been migrated to Git commit 4b5ac9e09e

Note: SVN reference [10771] has been migrated to Git commit 46589ee421

Note: SVN reference [10772] has been migrated to Git commit c73659e95c

Note: SVN reference [10773] has been migrated to Git commit 2e6633c016
2016-02-05 22:18:14 +00:00
Russ Housley 4b5ac9e09e Indicate on the IESG Telechat Agenda if a document has an RFC Editor Note. To accomplish this, the RFC Editor Note needed to be separated from the rest of the ballot write up. Fixes #1230.
- Legacy-Id: 10770
2016-02-04 13:32:24 +00:00
Ole Laursen 197bc07771 Refactor search-related utilities slightly to make them more
independent of the search form, to enable them to be reused in the
community lists.

Also clean up the related code a bit, use SearchForm to handle other
document types, and fix missing ids in the HTML so that one can click
the "by" labels to hit the corresponding radio button.
 - Legacy-Id: 10729
2016-01-25 18:11:49 +00:00
Robert Sparks 67f0234cac Refactored counting telechat pages to do it only in one place. Count more accurately and make it possible to report more granularly. Added page counts to agenda.json. Commit ready to merge.
- Legacy-Id: 10636
2016-01-07 23:31:05 +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 625347cd2f Merged trunk@9354 to facelift copy
- Legacy-Id: 9357
2015-04-02 06:51:34 +00:00
Henrik Levkowetz 2f54511763 Changed all explicitly set HttpResponse content_types to specify charset.
Django sets charset if you don't specify a content_type; if you specify
one you also must add a charset specification (if you want one).  
Fixes issue #1647.
 - Legacy-Id: 9348
2015-03-26 21:35:21 +00:00
Ole Laursen eccd8d27c4 Make new branch from trunk (r9007) and merge facelift-r8876 into it, fixing a few merge conflicts
- Legacy-Id: 9014
2015-02-06 14:08:34 +00:00
Ole Laursen b5458c29d3 Summary: Clean up some of the FACELIFT comments
- Legacy-Id: 8959
2015-02-03 16:18:42 +00:00
Robert Sparks 65804be683 This is the second step towards ADs out of GroupInfo into Role.
The use of group.ad has been scrubbed from the code and templates.
  - Those places that set group.ad have been directly manipulate Role objects instead
  - Most places that read group.ad now use a new group.ad_role() that returns a Role object, simplifing some views.

Related to #1555 and #1557.

Commit ready for merge.
 - Legacy-Id: 8854
2015-01-09 18:52:06 +00:00
Robert Sparks 4c9db8f250 This is the first step towards using Role to represent Area directors. It
- Migrates the information captured in GroupInfo.ad to Role objects.
- Renames GroupInfo.ad to GroupInfo._ad (retaining the current column name) to prepare for deletion of that field.
- Provides ad property accessor and setter methods implemented using the group's role_set (so that the existing view code continues to work with minimal changes)
- Improved selection in many querysets that assumed only groups of type 'area' would have area directors.

Related to #1557 and #1555.

Commit ready to merge.
 - Legacy-Id: 8851
2015-01-08 20:22:23 +00:00
Ole Laursen 41cb195f52 Rebase /personal/lars/5.6.4-facelift/ on trunk
- Legacy-Id: 8520
2014-10-30 14:31:07 +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
Robert Sparks feb57a04f0 Replaces the return_to_url notion with logic that uses the session object. Related to bug #1430.
- Legacy-Id: 8305
2014-09-11 20:41:59 +00:00
Henrik Levkowetz f20a5d0cfb Changed URLs with explicit scheme from http to https.
- Legacy-Id: 7555
2014-03-31 00:25:08 +00:00
Henrik Levkowetz 8f6a21daf6 Made ietf/iesg pyflakes-clean.
- Legacy-Id: 7467
2014-03-15 17:38:56 +00:00
Ole Laursen 7e00fa1424 Move the Secretariat group email utility to wginfo and the rest of the wgcharter stuff to doc/(views|urls|utils)_charter.py alongside the other document types
- Legacy-Id: 7121
2014-01-13 16:08:58 +00:00
Ole Laursen 7f277a8fbb Replace user.get_profile() with user.person, the profile stuff is deprecated since Django 1.5
- Legacy-Id: 6968
2013-12-18 10:13:40 +00:00
Ole Laursen 84a9f49053 mimetype -> content_type (mimetype is deprecated)
- Legacy-Id: 6945
2013-12-16 16:53:47 +00:00
Ole Laursen 6a98fec2c3 Use built-in json module in Python instead of simplejson bundled with Django
- Legacy-Id: 6883
2013-12-11 16:59:19 +00:00
Ole Laursen cfa0d47ca0 Port to new class-based generic redirect and simple template views, remove utils.lazy.reverse_lazy, it's now included in Django
- Legacy-Id: 6878
2013-12-11 16:36:09 +00:00
Ole Laursen 19da33d8ff Make the search for specific draft name in IPR support both drafts and RFCs, clean up some related cruft
- Legacy-Id: 6775
2013-12-02 17:29:17 +00:00
Ole Laursen 9842eef405 For no good reason, agenda_data took request as first parameter, remove this as it makes testing harder
- Legacy-Id: 6487
2013-10-25 12:53:54 +00:00
Ole Laursen 10dceef26d Refactor IESG agenda pages, put the agenda structure in a helper function in agenda.py, build the agenda up around this structure, and reuse this everywhere instead of duplicating the structure in various templates and the JSON view - this also fixes a couple of minor bugs where the copy-pasted copies were not entirely in sync
- Legacy-Id: 6454
2013-10-16 13:07:09 +00:00
Ole Laursen ec7e01481d Fix a potential bug with milestones_needing_review and ad-less groups
- Legacy-Id: 6430
2013-10-11 14:50:30 +00:00
Ole Laursen b6c4f725b9 Fix accidental debug slicing in IESG discusses - of note is that the
discusses page now supports more than just I-Ds
 - Legacy-Id: 6420
2013-10-11 13:06:38 +00:00
Ole Laursen 1975ff27d0 Port IESG discusses to new schema
- Legacy-Id: 6418
2013-10-11 13:03:40 +00:00
Ole Laursen f6ff2a8082 Delete all old WGAction stuff, it's superceded by the WG charter
support, clean up iesg/models.py a bit
 - Legacy-Id: 6411
2013-10-10 16:12:34 +00:00
Ole Laursen 77aa4723bf Use the right path for other document types in
/iesg/agenda/telechat-YYYY-MM-DD-docs.tgz which now as a side-effect
of the port can bundle more than just drafts
 - Legacy-Id: 6410
2013-10-10 15:57:00 +00:00
Ole Laursen 21b32e72a3 Port /iesg/agenda/telechat-YYYY-MM-DD-docs.tgz, use tarfile.addfile
and StringIO to avoid the temporary file
 - Legacy-Id: 6407
2013-10-10 11:12:13 +00:00
Ole Laursen 0860342e34 Port /iesg/agenda/documents/ to new schema, fix problem with rows
being colored for ADs with their position even if a ballot icon is not
shown (issue #1128)
 - Legacy-Id: 6405
2013-10-10 10:31:28 +00:00
Ole Laursen a728468711 Fix some problems highlighted by the tests, making the code a bit more
robust in case of unexpected data
 - Legacy-Id: 6402
2013-10-09 16:28:36 +00:00
Ole Laursen 516a5fcc92 Port /iesg/agenda/documents.txt to new schema, compose the table in
Python instead of using a template to make the code easier to read
 - Legacy-Id: 6400
2013-10-09 15:55:45 +00:00
Ole Laursen 53c59e56e3 Remove vary_on_cookie on agenda view, it's not needed anymore, Django
already adds the vary: cookie header automatically
 - Legacy-Id: 6399
2013-10-09 12:55:28 +00:00
Ole Laursen be9fd53d55 Remove the ?private thing in /iesg/agenda/, the only use of it appears
to be agenda_package.txt and that file already includes the links that
are enabled by the flag - perhaps it predates the user modeling that
allows ADs and Secretariat to see the links
 - Legacy-Id: 6398
2013-10-09 12:53:13 +00:00
Ole Laursen bd34270cbc Port IESG agenda pages to new schema, add tests for them, move agenda
utilities to agenda.py, fix a couple of things, remove obsolete test
versions of agenda view, add support for viewing future IESG agendas
through /agenda/YYYY-MM-DD/* (useful when testing)
 - Legacy-Id: 6395
2013-10-09 12:40:42 +00:00
Ole Laursen 5fe7ce62ff Add timeframe to IESG Review Decisions page
- Legacy-Id: 6348
2013-10-03 11:41:47 +00:00
Ole Laursen b552ff31aa Replace the announcement pages with a new page collecting all IESG
review decisions. Add migration to split up iesg_approve/disapprove
events of the form "IESG has approved ... and state has been changed
..." into the approve/disapprove event and a synthesized state change
event. Also regularize the descriptions a bit. This simplifies the
code in the new page.
 - Legacy-Id: 6340
2013-10-02 15:37:44 +00:00
Ole Laursen b4988b2b45 Make IESG discusses use doc/search/status_columns.html with a quick hack to break dependency on ietfworkflows, remove now unused idrfc/status_columns.html, remove unused iesg/agenda_documents_row_status.html
- Legacy-Id: 6220
2013-09-20 15:55:28 +00:00
Ole Laursen d2b9adf3cb Move ietf_filters templatetag from idtracker/ to doc/
- Legacy-Id: 6053
2013-08-14 15:11:24 +00:00
Ole Laursen 2cf79bb04c Move update_telechat from idrfc.utils to doc.utils, port remaining
code to using log_state_changed from doc.utils, remove idrfc/utils.py
 - Legacy-Id: 6050
2013-08-13 16:44:07 +00:00
Ole Laursen ec2f0cabbf Delete dead code from idrfc, and delete some obsolete imports too
- Legacy-Id: 6001
2013-08-09 14:55:51 +00:00
Henrik Levkowetz cbfe489ff5 Merged in more shim-layer removals from olau@iola.dk
(-r5465:HEAD from branch/iola/shimfree).  Copying relevant
commit messages here:

 - Deleted dead code in many places.

 - Renamed id-something to draft-something, make the "is
   this eligible for expiration" logic clearer

 - Added a name for IPR search URL

 - Revamped the ballot popup view

 - URL reversed the IPR search link instead of hardcoding it

 - Cleaned up search views and remove dead code, port them to the new DB
   schema, hack related views in iesg/ and wginfo/ to use the new search
   interfaces, avoid camelCase in search GET parameters (with
   backwards-compat fallback), add some simple search unit tests, remove
   caching from views_search.py index pages as they're now pretty fast to
   generate, rewrite ballot popup JS, regularize some CSS classes to use
   hyphen-notation rather than camelCase, move some of the search
   templates to doc/.

   idrfc/ now mostly contains some wrapper code still in use by other
   subdirs, some ported code not yet moved, and dead code.

 - Fixed output bug in test crawler and print referrer upon errors so it's
   easier to figure out where a link came from

 - Added /doc/in-last-call/ to crawler, report original page as referrer in
   a redirect chain rather than intermediate URL

 - Ported idindex to new schema, speed them up, add tests, refactor index
   page in views_search to share code with the text index file, get rid
   of some special-case idindex filters from ietf_filters, move
   "/drafts/" redirects to a file in /doc/

 - Ported /idtracker/status/ and /idtracker/status/last-call/ overview of
   drafts in IESG process to new schema in /doc/iesg/ and
   /doc/iesg/last-call/

 - Added redirects for all of /idtracker/*, removed all view code and other
   dead code from idtracker/

 - Removed the idtracker sitemap indexing drafts - in its current form,
   it adds nothing of value to the HTML-based /doc/all/ view, and it's
   pretty slow

 - Ported idtracker feeds to new schema, move them to doc/, cleaned up
   idtracker/ - only templatetags/ietf_filters and proxy code is left
 - Legacy-Id: 5836
2013-07-17 20:52:39 +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 47c25227d9 Always show IANA state (not only for certain states)
- Legacy-Id: 5756
2013-05-23 17:57:10 +00:00
Henrik Levkowetz bd0c07290a Merged in branch/iola/milestones, which provides datatracker support for management of WG milestones.
- Legacy-Id: 5739
2013-05-15 22:07:23 +00:00
Ole Laursen e94d1df549 Clean up search views and remove dead code, port them to the new DB
schema, hack related views in iesg/ and wginfo/ to use the new search
interfaces, avoid camelCase in search GET parameters (with
backwards-compat fallback), add some simple search unit tests, remove
caching from views_search.py index pages as they're now pretty fast to
generate, rewrite ballot popup JS, regularize some CSS classes to use
hyphen-notation rather than camelCase, move some of the search
templates to doc/.

idrfc/ now mostly contains some wrapper code still in use by other
subdirs, some ported code not yet moved, and dead code.
 - Legacy-Id: 5611
2013-04-04 13:42:57 +00:00