details: http://www.bx.psu.edu/hg/galaxy/rev/fa0483a31237
changeset: 2920:fa0483a31237
user: rc
date: Mon Oct 26 15:05:20 2009 -0400
description:
Samples go to to next state when bar codes are assigned to them
3 file(s) affected in this change:
lib/galaxy/web/controllers/requests.py
lib/galaxy/web/controllers/requests_admin.py
templates/admin/requests/show_request.mako
diffs (58 lines):
diff -r ef5215401458 -r fa0483a31237 lib/galaxy/web/controllers/requests.py
--- a/lib/galaxy/web/controllers/requests.py Mon Oct 26 14:01:46 2009 -0400
+++ b/lib/galaxy/web/controllers/requests.py Mon Oct 26 15:05:20 2009 -0400
@@ -460,7 +460,7 @@
select_request_type = self.__select_request_type(trans, request_type.id)
# list of widgets to be rendered on the request form
widgets = []
- widgets.append(dict(label='Name',
+ widgets.append(dict(label='Name of the Experiment',
widget=TextField('name', 40,
util.restore_text( params.get( 'name', '' ) )),
helptext='(Required)'))
diff -r ef5215401458 -r fa0483a31237 lib/galaxy/web/controllers/requests_admin.py
--- a/lib/galaxy/web/controllers/requests_admin.py Mon Oct 26 14:01:46 2009 -0400
+++ b/lib/galaxy/web/controllers/requests_admin.py Mon Oct 26 15:05:20 2009 -0400
@@ -358,7 +358,7 @@
widgets.append(dict(label='Select user',
widget=self.__select_user(trans, user_id),
helptext='The request would be submitted on behalf of this user (Required)'))
- widgets.append(dict(label='Name',
+ widgets.append(dict(label='Name of the Experiment',
widget=TextField('name', 40,
util.restore_text( params.get( 'name', '' ) )),
helptext='(Required)'))
@@ -391,7 +391,7 @@
def __get_email(user):
return user.email
user_list = trans.sa_session.query( trans.app.model.User )
- user_list.sort(key=__get_email)
+ #user_list.sort(key=__get_email)
for user in user_list:
if not user.deleted:
if userid == str(user.id):
@@ -1038,6 +1038,12 @@
bar_code = util.restore_text(params.get('sample_%i_bar_code' % index, ''))
sample.bar_code = bar_code
sample.flush()
+ # change the state of all the samples to the next state
+ # get the new state
+ new_state = request.type.states[1]
+ for s in request.samples:
+ event = trans.app.model.SampleEvent(s, new_state, 'Bar code added to this sample')
+ event.flush()
return trans.response.send_redirect( web.url_for( controller='requests_admin',
action='bar_codes',
request_id=request.id,
diff -r ef5215401458 -r fa0483a31237 templates/admin/requests/show_request.mako
--- a/templates/admin/requests/show_request.mako Mon Oct 26 14:01:46 2009 -0400
+++ b/templates/admin/requests/show_request.mako Mon Oct 26 15:05:20 2009 -0400
@@ -180,7 +180,7 @@
${render_sample_form( sample_index, sample[0], sample[1], grid_index, fields_dict)}
%endif
<td>
- %if request.unsubmitted() and grid_index == 0:
+ %if grid_index == 0:
<a class="action-button" href="${h.url_for( controller='requests_admin', action='delete_sample', request_id=request.id, sample_id=sample_index)}">
<img src="${h.url_for('/static/images/delete_icon.png')}" />
<span></span></a>
details: http://www.bx.psu.edu/hg/galaxy/rev/50631e30ede2
changeset: 2914:50631e30ede2
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri Oct 23 13:58:56 2009 -0400
description:
2 more sqlalchemy 0.5 query fixes.
2 file(s) affected in this change:
lib/galaxy/jobs/__init__.py
lib/galaxy/tools/__init__.py
diffs (24 lines):
diff -r a559bdff7fdc -r 50631e30ede2 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py Fri Oct 23 13:54:15 2009 -0400
+++ b/lib/galaxy/jobs/__init__.py Fri Oct 23 13:58:56 2009 -0400
@@ -533,7 +533,7 @@
#since if it is edited, the metadata changed on the running output will no longer match
#the metadata that was stored to disk for use via the external process,
#and the changes made by the user will be lost, without warning or notice
- dataset.metadata.from_JSON_dict( self.external_output_metadata.get_output_filenames_by_dataset( dataset ).filename_out )
+ dataset.metadata.from_JSON_dict( self.external_output_metadata.get_output_filenames_by_dataset( dataset, self.sa_session ).filename_out )
try:
assert context.get( 'line_count', None ) is not None
if ( not dataset.datatype.composite_type and dataset.dataset.is_multi_byte() ) or self.tool.is_multi_byte:
diff -r a559bdff7fdc -r 50631e30ede2 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py Fri Oct 23 13:54:15 2009 -0400
+++ b/lib/galaxy/tools/__init__.py Fri Oct 23 13:58:56 2009 -0400
@@ -1568,7 +1568,7 @@
for name, dataset in inp_data.iteritems():
external_metadata = galaxy.datatypes.metadata.JobExternalOutputMetadataWrapper( job )
if external_metadata.external_metadata_set_successfully( dataset, app.model.context ):
- dataset.metadata.from_JSON_dict( external_metadata.get_output_filenames_by_dataset( dataset ).filename_out )
+ dataset.metadata.from_JSON_dict( external_metadata.get_output_filenames_by_dataset( dataset, app.model.context ).filename_out )
# If setting external metadata has failed, how can we inform the user?
# For now, we'll leave the default metadata and set the state back to its original.
dataset.datatype.after_edit( dataset )