Feature/suggestion2journal

Adds the reapplication statuses to the forms, provides Suggestion.make_journal which knows how to handle reapplication data, and update formcontexts _carry_fixed_aspects to ensure that reapplication data isn't lost between edits.

Includes tests, although the formcontext test is disabled because there is a problem with running url_for outside a running flask app that using the app.test_request_context() doesn't resolve.  Requires more careful application of flask testing environment.
Yes, but only Suggestions define current_journal, so this is just a
try/except in place of a type check - I was being lazy with regard to
splitting out the differences in the formcontext hierarchy :)

On 12 November 2014 12:42, Emanuil Tolev <notifications@github.com> wrote:

> In portality/formcontext/formcontext.py:
>
> > @@ -214,6 +214,18 @@ def _carry_fixed_aspects(self):
> >          self.target.set_created(created_date)
> >          self.target.data['id'] = self.source.data['id']
> >
> > +        if self.source.current_application:
> > +            self.target.set_current_application(self.source.current_application)
> > +
> > +        if self.source.last_reapplication:
> > +            self.target.set_last_reapplication(self.source.last_reapplication)
> > +
> > +        try:
> > +            if self.source.current_journal:
> > +                self.target.set_current_journal(self.source.current_journal)
>
> This could throw an unspecified exception? It's just a setter like the 2
> above, isn't it?
>
> Otherwise good to merge - the tests are enough to show this would work and
> they pass, the next level of testing would be to try in on the test server.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/DOAJ/doaj/pull/378/files#r20216240>.
>



-- 

Richard Jones,

Founder, Cottage Labs
t: @richard_d_jones, @cottagelabs
w: http://cottagelabs.com