| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
Fixes #1082.
|
|
|
|
|
|
| |
Add some notes on the logic and expectations around
InfoRequest.described_state and calculate_status and
InfoRequestEvent.described_state and calculated_state.
|
|
|
|
|
|
|
| |
Make sure that admin edits changing the described state of an info
request are reflected in the latest_status and status values of info
request events so that the info requests are retrieved correctly in
status-based searches.
|
|
|
|
|
|
|
|
| |
Update test expectations and add further test to explicitly show that we
want the described status from a status update to be propagated to a
preceding response, as well as being filled in in the status update
itself (which is mostly to deal with the case where there isn't a
preceding response). Make those changes to calculate_event_states
|
|
|
|
| |
ruby 1.8 by using mb_chars for length comparison - it counts multibyte characters.
|
|\
| |
| |
| |
| |
| |
| | |
'openaustralia_github/tests_set_described_state' into rails-3-develop
Conflicts:
spec/models/info_request_spec.rb
|
| | |
|
| |
| |
| |
| | |
user classifies a request
|
| | |
|
| |
| |
| |
| | |
translation gets picked up by rake gettext:find. Add a bit more explanation.
|
|\ \ |
|
| | |
| | |
| | |
| | | |
body is only quoted text and there is no subject.
|
|\| |
| | |
| | |
| | |
| | | |
Conflicts:
spec/models/info_request_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
spec/models/info_request_spec.rb
|
|\| | |
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
functions calling gsub on the result. SafeBuffer won't work with gsub until Rails 3.2 https://github.com/rails/rails/commit/b4a6e2f8442ceda118367f9a61c38af754be1cbf
|
| | | |
| | | |
| | | |
| | | | |
name (with the '(account suspended)' suffix) is marked by the translation call as HTML safe, so escapes the angled brackets when they are appended to it in the contact mailer code. Use string interpolation instead.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
'openaustralia_github/more_info_on_report_request' into rails-3-develop
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
'openaustralia_github/inline_search_method_refactor' into rails-3-develop
|
| | | | | | |
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
'openaustralia_github/small_email_hash_refactor' into rails-3-develop
|
| | |_|_|/
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
'openaustralia_github/remove_random_request_action' into rails-3-develop
|
| | |/ / /
| |/| | | |
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
the main part in order to look for uuencoded text, make sure that we're getting that main part from the reparsed attachments, and not getting an obsolete attachment. Fixes #958.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If the display_filename of the attachment found from the
URL part number doesn't match the passed in display_filename
then the email may have been reparsed, causing a reordering.
In that case, look to see if there is another attachment that
uniquely matches that filename, and, if so, return that other
attachment. If no matching uniquely matching filename is
found, redirect to the incoming message, rather than
returning a 404.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Handling of outlook-packed attachments would fail from
rake tasks or in the console without requiring 'mapi/msg'
and 'mapi/convert' beforehand. Instead, require them in
the source file where they're actually used.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Under Rails 3, the uudecoded FoiAttachment in this test
fails validation at the self.save! in
IncomingMessage.parse_raw_email, although the FoiAttachment
has been correctly created and saved to the database in
_uudecode_and_save_attachments. Forcing a reload=true on
self.foi_attachments fixes this.
Thanks to Louise Crow for finding the fix for this problem.
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
One of these changes is to make sure that the Mail backend,
like the TMail backend it replaces, will return text parts
encoded in UTF-8 if possible.
The other change is to ensure that when text attachments are
reloaded from disk, we attempt to convert them to UTF-8.
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | /
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Gemfile.lock
app/controllers/public_body_controller.rb
app/mailers/track_mailer.rb
app/views/request/_hidden_correspondence.html.erb
app/views/request/_sidebar.html.erb
app/views/request/hidden.html.erb
app/views/request/new_please_describe.html.erb
app/views/request/preview.html.erb
app/views/user/show.html.erb
config/environment.rb
config/routes.rb
spec/controllers/public_body_controller_spec.rb
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes #336
There was an occasional deadlock when two emails for the
same request came in near-simultaneously; two processes
would be started via script/mailin, each to deal with one
email which are both updating the same InfoRequest.
The error would look like:
2013-04-07 09:19:03 BST [13398]: [2-1] DETAIL: Process 13398 waits for ShareLock on transaction 36193647; blocked by process 13397.
Process 13397 waits for ExclusiveLock on tuple (390,35) of relation 32918788 of database 32918687; blocked by process 13398.
Process 13398: UPDATE "info_requests" SET "updated_at" = '2013-04-07 08:19:02.139515', "awaiting_description" = 't' WHERE "id" = 156200
Process 13397: UPDATE "info_requests" SET "updated_at" = '2013-04-07 08:19:02.143624', "awaiting_description" = 't' WHERE "id" = 156200
This arose from the following section of code:
ActiveRecord::Base.transaction do
raw_email = RawEmail.new
incoming_message.raw_email = raw_email
incoming_message.info_request = self
incoming_message.save!
raw_email.data = raw_email_data
raw_email.save!
self.awaiting_description = true
params = { :incoming_message_id => incoming_message.id }
if !rejected_reason.empty?
params[:rejected_reason] = rejected_reason.to_str
end
self.log_event("response", params)
self.save!
end
Matthew Somerville explained what was happening here in the
issue report; to repeat his explanation from the bug report,
both processes enter the transaction block and acquire a
ShareLock on self with:
incoming_message.info_request = self
incoming_message.save!
However, in order to update the self.awaiting_description field
of the InfoRequest, with:
self.awaiting_description = true
[...]
self.save!
... the ShareLock needs to be upgraded to an ExclusiveLock,
but both will wait until the other's ShareLock is released,
which would only happen at the end of the transaction.
We can avoid this deadlock by using SELECT ... FOR UPDATE
for the row in info_requests. In Rails 3.2.0 there is
ActiveRecord support for this (via with_lock and lock! on
a model instance) but so as not to require upgrading rails,
I'm just using raw SQL.
|
| | | |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
app/models/outgoing_message.rb
app/views/general/search.rhtml
app/views/public_body/list.rhtml
app/views/public_body/show.rhtml
app/views/public_body/view_email.rhtml
app/views/request/_after_actions.rhtml
app/views/request/_followup.rhtml
app/views/request/_sidebar.rhtml
app/views/request/new.rhtml
app/views/request/select_authority.rhtml
app/views/request/upload_response.rhtml
locale/aln/app.po
locale/app.pot
locale/ar/app.po
locale/bs/app.po
locale/ca/app.po
locale/cs/app.po
locale/cy/app.po
locale/de/app.po
locale/en/app.po
locale/en_IE/app.po
locale/es/app.po
locale/eu/app.po
locale/fr/app.po
locale/gl/app.po
locale/hu_HU/app.po
locale/id/app.po
locale/nb_NO/app.po
locale/pt_BR/app.po
locale/ro_RO/app.po
locale/sl/app.po
locale/sq/app.po
locale/sr@latin/app.po
locale/tr/app.po
locale/uk/app.po
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|