You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/05/28 14:24:48 UTC

[whimsy] branch master updated: don't allow edits to reports, resolutions, or discussion items once draft minutes have been posted

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new a639fde  don't allow edits to reports, resolutions, or discussion items once draft minutes have been posted
a639fde is described below

commit a639fdef5e310d1c35aa16a0b071f97657e6e3f3
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon May 28 10:24:09 2018 -0400

    don't allow edits to reports, resolutions, or discussion items once draft minutes have been posted
---
 www/board/agenda/spec/reports_spec.rb      | 58 ++++++++++++++++--------------
 www/board/agenda/views/models/agenda.js.rb | 30 ++++++++--------
 2 files changed, 48 insertions(+), 40 deletions(-)

diff --git a/www/board/agenda/spec/reports_spec.rb b/www/board/agenda/spec/reports_spec.rb
index cc0171a..b87fd36 100644
--- a/www/board/agenda/spec/reports_spec.rb
+++ b/www/board/agenda/spec/reports_spec.rb
@@ -33,53 +33,56 @@ feature 'report' do
   end
 
   it "should show the Avro report" do
-    visit '/2015-01-21/Avro'
+    visit '/2015-02-18/ACE'
 
     # header
     expect(page).to have_selector '.navbar-fixed-top.reviewed .navbar-brand', 
-      text: 'Avro'
+      text: 'ACE'
 
     # info
-    expect(page).to have_selector 'dd', text: 'I'
-    expect(page).to have_selector 'dd', text: 'Tom White'
-    expect(page).to have_selector 'dd', text: 'Chris'
+    expect(page).to have_selector 'dd', text: 'B'
+    expect(page).to have_selector 'dd', text: 'Marcel Offermans'
+    expect(page).to have_selector 'dd', text: 'Sam'
     expect(page).to have_selector 'dd', text: /, sr,/
 
     # content
     expect(page).to have_selector 'pre', 
-      text: /no issues that require the board's attention/
+      text: /User reports with questions and issues about scripting/
 
     # no comments
     expect(page).not_to have_selector 'h4#comments', text: 'Comments'
 
     # footer
-    expect(page).to have_selector '.backlink[href="Attic"]', 
-     text: 'Attic'
-    expect(page).to have_selector 'button', text: 'edit comment'
+    expect(page).to have_selector '.backlink[href="Abdera"]', 
+     text: 'Abdera'
+    expect(page).to have_selector 'button', text: 'add comment'
     expect(page).to have_selector 'button', text: 'approve'
     expect(page).to have_selector 'button', text: 'edit report'
-    expect(page).to have_selector '.nextlink[href="Axis"]', 
-     text: 'Axis'
-
-    # pending comments
-    expect(page).to have_selector 'h5#pending', text: 'Pending Comment'
-    expect(page).to have_selector 'div.commented pre', text: 'jt: Nice report!'
+    expect(page).to have_selector '.nextlink[href="ActiveMQ"]', 
+     text: 'ActiveMQ'
 
     # hidden forms
     expect(page).to have_selector '.modal .modal-dialog .modal-header h4',
-      text: 'Edit comment'
+      text: 'Enter a comment'
     expect(page).to have_selector 'input[id=flag][type=checkbox]'
     expect(page).to have_selector 'span', text: 'item requires discussion or follow up'
     expect(page).to have_selector '.modal .modal-dialog .modal-header h4',
       text: 'Edit Report'
     expect(page).to have_selector '#post-report-text',
-      text: 'Apache Avro is a cross-language data serialization system.'
+      text: /Apache ACE is a software distribution framework/
     expect(page).to have_selector \
-      "#post-report-message[value='Edit Avro Report']"
+      "#post-report-message[value='Edit ACE Report']"
+  end
+
+  it "should show pending comments" do
+    visit '/2015-01-21/Avro'
+    expect(page).to have_selector 'h5#pending', text: 'Pending Comment'
+    expect(page).to have_selector 'div.commented pre', text: 'jt: Nice report!'
+    expect(page).to have_selector 'button', text: 'edit comment'
   end
 
   it "should show missing reports" do
-    visit '/2015-01-21/DirectMemory'
+    visit '/2015-02-18/DirectMemory'
     expect(page).to have_selector 'pre em', text: 'Missing'
     expect(page).not_to have_selector 'dt', text: 'Approved'
 
@@ -88,16 +91,11 @@ feature 'report' do
     expect(page).to have_selector 'button', text: 'add comment'
     expect(page).not_to have_selector 'button', text: 'approve'
     expect(page).to have_selector 'pre.comment', 
-      text: 'sr: I have the action from last month.'
+      text: "gs: notified. heard back already: they'll submit next month."
 
-    # action items
-    expect(page).to have_selector 'h4 a[href="Action-Items"]',
-      text: 'Action Items'
-    expect(page).to have_selector 'button', text: 'post report'
-    expect(page).to have_selector 'pre.report', 
-      text: '* Sam: Follow up with a more complete report next month'
 
     # hidden forms
+    expect(page).to have_selector 'button', text: 'post report'
     expect(page).to have_selector '.modal .modal-dialog .modal-header h4',
       text: 'Enter a comment'
     expect(page).to have_selector '.modal .modal-dialog .modal-header h4',
@@ -106,6 +104,14 @@ feature 'report' do
       "#post-report-message[value='Post DirectMemory Report']"
   end
 
+  it "should show action items" do
+    visit '/2015-01-21/DirectMemory'
+    expect(page).to have_selector 'pre.report', 
+      text: '* Sam: Follow up with a more complete report next month'
+    expect(page).to have_selector 'h4 a[href="Action-Items"]',
+      text: 'Action Items'
+  end
+
   it "should show draft minutes" do
     visit '/2015-02-18/Drill'
 
diff --git a/www/board/agenda/views/models/agenda.js.rb b/www/board/agenda/views/models/agenda.js.rb
index 7e7ada5..25054c5 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -491,20 +491,22 @@ class Agenda
 
     if @attach =~ /^(\d|7?[A-Z]+|4[A-Z]|8[.A-Z])$/
       if User.role == :secretary or not Minutes.complete
-        if @attach =~ /^8[.A-Z]/
-          if @attach =~ /^8[A-Z]/
-            list << {form: Post, text: 'edit item'}
-          elsif not text or @text.strip().empty?
-            list << {form: Post, text: 'post item'}
-          else
-            list << {form: Post, text: 'edit items'}
-          end
-        elsif self.missing
-          list << {form: Post, text: 'post report'}
-        elsif @attach =~ /^7\w/
-          list << {form: Post, text: 'edit resolution'}
-        else
-          list << {form: Post, text: 'edit report'}
+        unless Server.drafts.include? Agenda.file.sub('_agenda_', '_minutes_')
+	  if @attach =~ /^8[.A-Z]/
+	    if @attach =~ /^8[A-Z]/
+	      list << {form: Post, text: 'edit item'}
+	    elsif not text or @text.strip().empty?
+	      list << {form: Post, text: 'post item'}
+	    else
+	      list << {form: Post, text: 'edit items'}
+	    end
+	  elsif self.missing
+	    list << {form: Post, text: 'post report'}
+	  elsif @attach =~ /^7\w/
+	    list << {form: Post, text: 'edit resolution'}
+	  else
+	    list << {form: Post, text: 'edit report'}
+	  end
         end
       end
     end

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.