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

do not use localized date for chart js. #2306

Merged
merged 2 commits into from
Nov 16, 2017

Conversation

veroc
Copy link
Contributor

@veroc veroc commented Nov 14, 2017

Do not use localized dates for control chart as it breaks the controlchart.js datetime parser.

bika.lims.graphics.controlchart.js
// Convert values to floats
// "2014-02-19 03:11 PM"
x_data_parse = d3.time.format("%Y-%m-%d %I:%M %p").parse;

@@ -167,6 +167,7 @@ def folderitem(self, obj, item, index):
# they are not actually used in the table rendering.
item['Keyword'] = service.getKeyword()
item['Unit'] = service.getUnit()
item['CapturedRaw'] = obj.getResultCaptureDate().strftime('%Y-%m-%d %I:%M %p')
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @veroc, did you test this also when the result has no capture date?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assumed that there're only results with capture date in this context. Now it returns an empty string on missing date.

@ramonski ramonski merged commit b469aa6 into bikalims:master Nov 16, 2017
xispa referenced this pull request in xispa/senaite.core Nov 17, 2017
* do not use localized date for chart js.

* return empty string on missing capture date.

Conflicts:
	bika/lims/browser/referencesample.py
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.

2 participants