Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 'is_temporary' field to saved narrative objects, not just workspace metadata #1227

Merged
merged 2 commits into from
Jan 8, 2018

Conversation

briehl
Copy link
Member

@briehl briehl commented Jan 6, 2018

All this needs to do from here (other work is in kbaseapps/NarrativeService) is to ensure that there's an "is_temporary" field in the saved object metadata, and it's set to "false" on save.

The user should be prevented from saving an "untitled" narrative elsewhere.

@briehl briehl requested a review from MrCreosote January 6, 2018 00:12
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0002%) to 12.455% when pulling b00ab33 on briehl:is_temp_metadata into d15c17a on kbase:develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0002%) to 12.455% when pulling 878fd67 on briehl:is_temp_metadata into d15c17a on kbase:develop.

@@ -211,6 +211,7 @@ def write_narrative(self, obj_ref, nb, cur_user):
meta[u'job_ids'][u'apps'] = list()
if 'job_usage' not in meta[u'job_ids']:
meta[u'job_ids'][u'job_usage'] = {u'queue_time': 0, u'run_time': 0}
meta[u'is_temporary'] = 'false'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so according to bill in this case, as opposed to the narrative service, Untitled is a fine name for a non-temporary narrative. Saving a narrative here implies that 1) the user has changed the name or 2) the user has run an app. Hence the narrative is no longer empty and not temporary.

Effectively, once the narrative service creates an empty narrative, the front end cannot save temporary narratives.

@briehl briehl merged commit f7444d4 into kbase:develop Jan 8, 2018
@briehl briehl deleted the is_temp_metadata branch May 8, 2018 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants