Skip to content

Commit

Permalink
Fixes merge conflicts in doc/mkdocs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Jun 15, 2022
2 parents 491ae14 + b83ba20 commit a15cebb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
9 changes: 8 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 0.22.1 (Minor Release)

#### Exclude many to one relationships from the advanced search

Many to one fields are no longer visible in the advanced search screen.


### 0.22.0 (Major Release)

#### Advanced search changes
Expand All @@ -9,11 +16,11 @@ A list of functions attached to the application object that
enable the application to add, remove or alter files in an
advanced search extract.


#### Include ID in the extract

The model ID will no longer be excluded from its csv extract. If present, id will appear first, then patient id, then episode id.


### 0.21.0 (Major Release)

#### Celery upgrade and Django Celery library change.
Expand Down
2 changes: 1 addition & 1 deletion doc/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dev_addr: 0.0.0.0:8965
include_next_prev: false

extra:
version: v0.22.0
version: v0.22.1

markdown_extensions:
- fenced_code
2 changes: 1 addition & 1 deletion opal/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
Declare our current version string
"""
__version__ = '0.22.0'
__version__ = '0.22.1'
8 changes: 5 additions & 3 deletions opal/core/search/static/js/search/controllers/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ angular.module('opal.controllers').controller(

return criteria;
};

$scope.searchableFields = function(columnName){
var column = $scope.findColumn(columnName);
// TODO - don't hard-code this
if(column){
return _.map(
_.reject(
Expand All @@ -97,8 +95,9 @@ angular.module('opal.controllers').controller(
if(_.contains(NOT_ADVANCED_SEARCHABLE, c.name)){
return true;
}
return c.type == 'token' || c.type == 'list';
return c.type == 'token' || c.type == 'list' || c.type == "many_to_o";;
}),

function(c){ return c; }
).sort();
}
Expand Down Expand Up @@ -144,6 +143,9 @@ angular.module('opal.controllers').controller(
};

$scope.getChoices = function(column, field){
if(!field){
return []
}
var modelField = $scope.findField(column, field);

if(modelField.lookup_list && modelField.lookup_list.length){
Expand Down
11 changes: 11 additions & 0 deletions opal/core/search/static/js/test/extract.controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ describe('ExtractCtrl', function(){
"name":"consistency_token",
"type":"token"
},
{
"title":"A Many To One",
"lookup_list":null,
"name":"a many to one",
"type":"many_to_o"
},
{
"title":"Created",
"lookup_list":null,
Expand Down Expand Up @@ -375,6 +381,11 @@ describe('ExtractCtrl', function(){
var result = $scope.getChoices("some", "field");
expect(result).toEqual([1, 2, 3]);
});

it('should error if there is no field', function(){
var result = $scope.getChoices("some", null);
expect(result).toEqual([]);
});
});

describe('refresh', function(){
Expand Down

0 comments on commit a15cebb

Please sign in to comment.