-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
PR 2269 - Show the Unit in Manage Analyses View #281
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the priority svg files are missing, the priorities are not displayed when I test with this PR
items[x]["max"] = spec.get("max",'') | ||
items[x]["error"] = spec.get("error",'') | ||
items[x]['Price'] = analysis.getPrice() | ||
analysis.getService().getKeyword()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be analysis.getKeyword(). In senaite.lims/master, all attributes of the originating service are stored directly on the analysis. In any event, if you do find you want to get the service, this attribute is now called analysis.getAnalysisService()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, use analysis.getKeyword()
instead of analysis.getService().getKeyword()
... note analysis.getService()
is flagged as deprecated
item["error"] = spec.get("error", '') | ||
# Add priority premium | ||
item['Price'] = analysis.getPrice() | ||
item['Priority'] = analysis.getPriority() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analysis.getPriority() no longer exists; these were those awful AT objects, which have been replaced by AnalysisRequest.getPrioritySortkey. It also exists as Analysis.getPrioritySortkey(), which inherits the priority of it's parent AR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agree with your appreciation @rockfruit. Anyhow, I think that since this is the "manage_analyses" view from inside AR and the priority assigned to an Analysis corresponds tot that one assigned to the AR to which the analysis belongs, I don't think "Priority" column here being required. My suggestion is not to add this column.
if service is not None: | ||
uid = api.get_uid(service) | ||
if uid: | ||
rr_dict_by_service_uid[uid] = r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, better to not use get_service_by_keyword
here. IMO, the previous implementation was better, cause it was not waking-up objects, rather using brains. I'd wouldn't replace any logic here.
items[x]["max"] = spec.get("max",'') | ||
items[x]["error"] = spec.get("error",'') | ||
items[x]['Price'] = analysis.getPrice() | ||
analysis.getService().getKeyword()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, use analysis.getKeyword()
instead of analysis.getService().getKeyword()
... note analysis.getService()
is flagged as deprecated
@rockfruit the Priority icon was not rendered because Anyhow, priority column in this list has been removed, cause it doesn't make any sense (the |
Since the Priority column has been removed, there is no need to display priority icons here
Linked issue: bikalims/bika.lims#2268
Behavior before PR
Desired behavior after PR is merged
Comments
I just noticed that on the Analysis Requests view the Priority column has no header text (see image attached). I think it might be better to name it for clarity.