internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: OCHA-DAP/hdx-ckan

Issue:
About menu:  glitch on home page functionality
On **homepage only** and only in Chrome.
Click on about to open the submenu.
Click again to close the menu.
Move the cursor around the `About` text.
The menu text 'About' disappears and reappears unreliably as the cursor moves around it.  This is on chrome.  Does not occur in firefox.



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
@@ -53,6 +53,8 @@ def before_map(self, map):
         map.connect('/count/test', controller='ckanext.hdx_theme.count:CountController', action='test')
         
         map.connect('/organization/{id}/request_membership', controller='ckanext.hdx_theme.org_controller:HDXOrgController', action='request_membership')
+
+        map.connect('/about/{page}', controller='ckanext.hdx_theme.splash_page:SplashPageController', action='about')
         return map
     
     def create(self, entity):
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/splash_page.py b/ckanext-hdx_theme/ckanext/hdx_theme/splash_page.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/splash_page.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/splash_page.py
@@ -92,4 +92,14 @@ def _replace_group_org(self, string):
 	def _action(self, action_name):
 		''' select the correct group/org action '''
 		return get_action(self._replace_group_org(action_name))
-	
+
+	def about(self, page):
+		title = {'license': _('Data Licenses'),
+				 'terms': _('Terms of Service')}
+		html =  {'license': 'home/snippets/hdx_licenses.html',
+				 'terms': 'home/snippets/hdx_terms_of_service.html'}
+
+		extraVars = {'title': title.get(page), 'html': html.get(page), 'page': page}
+		return base.render('home/about2.html',  extra_vars = extraVars)
+
+
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version='v0.2.3'
\ No newline at end of file
+hdx_version='v0.2.4'
\ No newline at end of file


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Design fixes
Document with issues is here:
https://docs.google.com/spreadsheets/d/1j3qJLXuXwQeOPL5zrK8UAgTZXjYaFJa_w1u8COtYdZw/edit#gid=0
When fixing one issue please add a comment like "Row 1 fixed" or "Row 1 √ "   :)



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
@@ -187,9 +187,9 @@ def hdx_get_extras_element(extras, key='key', value_key='org_url', ret_key='valu
 def hdx_organizations_available_with_roles():
     organizations_available = h.organizations_available('read')
     if organizations_available and len(organizations_available) > 0:
-        am_sysadmin = new_authz.is_sysadmin(c.user)
         orgs_where_editor = []
         orgs_where_admin = []
+    am_sysadmin = new_authz.is_sysadmin(c.user)
     if not am_sysadmin:
         orgs_where_editor = set([org['id'] for org in h.organizations_available('create_dataset')])
         orgs_where_admin = set([org['id'] for org in h.organizations_available('admin')])


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Design fixes
Document with issues is here:
https://docs.google.com/spreadsheets/d/1j3qJLXuXwQeOPL5zrK8UAgTZXjYaFJa_w1u8COtYdZw/edit#gid=0
When fixing one issue please add a comment like "Row 1 fixed" or "Row 1 √ "   :)

Design fixes
Document with issues is here:
https://docs.google.com/spreadsheets/d/1j3qJLXuXwQeOPL5zrK8UAgTZXjYaFJa_w1u8COtYdZw/edit#gid=0
When fixing one issue please add a comment like "Row 1 fixed" or "Row 1 √ "   :)



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
@@ -108,6 +108,7 @@ def request_new_organization(self):
         errors = {}
         error_summary = {}
         data = {'from': request.params.get('from','')}
+        from_url = ''
 
         if 'save' in request.params:
             try:
@@ -126,7 +127,7 @@ def request_new_organization(self):
             if from_url and len(from_url) > 0:
                 h.redirect_to(from_url)
             else:
-                h.redirect_to('xxx')
+                h.redirect_to('/error')
 
         vars = {'data': data, 'errors': errors,
                 'error_summary': error_summary, 'action': 'new'}


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
remove text from home page 
Please remove this text from homepage 'This is an early version of the HDX Repository. Initially, you will be able to find global datasets relevant to humanitarian work as well as local datasets from our three pilot locations - Colombia, Kenya and Yemen. You can also create an account and add your own data to the repository to share privately or publicly. Please have a look around and send us your feedback!' this will be covered in the about page. Not sure if yumi will want to adjusts the centering of the remaining HDX and tagline but we can ask her



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version='v0.2.6'
\ No newline at end of file
+hdx_version='v0.3.0'
\ No newline at end of file


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Add Data when logged out results in error
As reported by Serban



Discussion:

Resolving patch:
diff --git a/ckanext-metadata_fields/ckanext/metadata_fields/dataset_controller.py b/ckanext-metadata_fields/ckanext/metadata_fields/dataset_controller.py
--- a/ckanext-metadata_fields/ckanext/metadata_fields/dataset_controller.py
+++ b/ckanext-metadata_fields/ckanext/metadata_fields/dataset_controller.py
@@ -167,8 +167,17 @@ def _save_new(self, context, package_type=None):
 
 	def new(self, data=None, errors=None, error_summary=None):
 		#Is the user a member of any orgs? If not make them join one first
-		if helpers.hdx_user_org_num(c.userobj.id) == 0:
-			return render('organization/request_mem_or_org.html')
+		try:
+			user_orgs = helpers.hdx_user_org_num(c.userobj.id)
+			if len(user_orgs) == 0:
+				return render('organization/request_mem_or_org.html')
+			#If there's an org and the user is not a member of this org redirect back to org select
+				this_org = request.params['organization_id']
+				if this_org in user_orgs:
+					return render('organization/request_mem_or_org.html')
+		except:
+			return render('user/login.html', extra_vars={'contribute':True})
+
 		package_type = self._guess_package_type(True)
 
 		context = {'model': model, 'session': model.Session,
diff --git a/ckanext-metadata_fields/ckanext/metadata_fields/helpers.py b/ckanext-metadata_fields/ckanext/metadata_fields/helpers.py
--- a/ckanext-metadata_fields/ckanext/metadata_fields/helpers.py
+++ b/ckanext-metadata_fields/ckanext/metadata_fields/helpers.py
@@ -27,4 +27,4 @@ def hdx_user_org_num(user_id):
     except logic.NotAuthorized:
             base.abort(401, _('Unauthorized to see organization member list'))    
         
-    return len(user)
\ No newline at end of file
+    return user
\ No newline at end of file


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
homepage - HDX text
hi, not sure if you are planning to fix this already but in the text on the homepage for The Humanitarian Data Exchange, the first line should be The Humanitarian and the second line Data Exchange. Tagline remains the same, thanks



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
@@ -109,13 +109,12 @@ def request_new_organization(self):
         error_summary = {}
         data = {'from': request.params.get('from','')}
         from_url = ''
-
         if 'save' in request.params:
             try:
                 data = self._process_new_org_request()
                 self._validate_new_org_request_field(data)
                 self._send_new_org_request(data)
-                from_url = data.get('from','')
+                #from_url = data.get('from','')
                 data.clear()
                 h.flash_success(_('Request sent successfully'))
             except logic.ValidationError, e:
@@ -124,10 +123,13 @@ def request_new_organization(self):
             except exceptions.Exception, e:
                 log.error(str(e))
                 h.flash_error(_('Request can not be sent. Contact an administrator'))
-            if from_url and len(from_url) > 0:
-                h.redirect_to(from_url)
-            else:
-                h.redirect_to('/error')
+            
+            #Removing this because the form doesn't submit a from parameter
+            h.redirect_to('user_dashboard_organizations')
+            #if from_url and len(from_url) > 0:
+            #    h.redirect_to(from_url)
+            #else:
+            #    h.redirect_to('/error')
 
         vars = {'data': data, 'errors': errors,
                 'error_summary': error_summary, 'action': 'new'}
@@ -141,9 +143,9 @@ def _process_new_org_request(self):
                 'description': request.params.get('description', ''), \
                 'your_email': request.params.get('your_email', ''), \
                 'your_name': request.params.get('your_name', ''), \
-                'from': request.params.get('from', '')
+                #'from': request.params.get('from', '')
                 }
-
+        print data
         return data
 
     def _validate_new_org_request_field(self, data):


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Epic SSL: mailchimp.js
Our _/mailchimp.js_ is calling _http://downloads.mailchimp.com/js/jquery.form-n-validate.js_
Changing "http://" into "//" failed, because downloads.mailchimp.com has an amazon generic certificate.

The workaround is to download the said _jquery.form-n-validate.js_ to _hdx-ckan/ckanext-hdx_theme/ckanext/hdx_theme/public/_ and edit _mailchimp.js_ from the same location; change line 32 to read: 
    _script.src = '/jquery.form-n-validate.js';_

Danke. :)



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
@@ -13,6 +13,7 @@
 import ckan.model as model
 import logging as logging
 import exceptions as exceptions
+import pylons.config as config
 
 log = logging.getLogger(__name__)
 
@@ -26,7 +27,6 @@ def send_mail(recipients, subject, body):
     else:
         h.flash_error(_('The are no recipients for this request. Contact an administrator '))
         raise exceptions.Exception('No recipients')
-    
 
 
 class HDXReqsOrgController(base.BaseController):
@@ -158,10 +158,13 @@ def _validate_new_org_request_field(self, data):
             raise logic.ValidationError(errors)
 
     def _send_new_org_request(self, data):
-
-        sys_admins = tk.get_action('hdx_get_sys_admins')()
-        sys_admins =[sys_admin for sys_admin in sys_admins if sys_admin['email']]
-
+#         sys_admins = tk.get_action('hdx_get_sys_admins')()
+#         sys_admins =[sys_admin for sys_admin in sys_admins if sys_admin['email']]
+        email = config.get('hdx.orgrequest.email', None)
+        if not email:
+            email = 'hdx.feedback@gmail.com'
+        display_name = 'HDX Feedback'
+        
         subject = _('New organization request:') + ' ' \
             + data['title']
         body = _('New organization request \n' \
@@ -174,5 +177,5 @@ def _send_new_org_request(self, data):
         '').format(org_name=data['title'], org_description = data['description'],
                    org_url = data['org_url'], person_name = data['your_name'], person_email = data['your_email'])
 
-        send_mail(sys_admins, subject, body)
+        send_mail([{'display_name': display_name, 'email': email}], subject, body)
         
\ No newline at end of file


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Update the version number on the logo and footer.
For sprint 25, we will increment to 0.3.2



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version='v0.3.1'
\ No newline at end of file
+hdx_version='v0.3.2'
\ No newline at end of file


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Org Admin:  Dataset management page is broken
Log in as a sysadmin user.
Go to:
http://data.hdx.rwlabs.org/organization/bulk_process/ocha-fiss-geneva



Discussion:
We're not using this URL ( action bulk_process ) anymore. We should probably show the organization page. 


Resolving patch:
diff --git a/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py b/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py
--- a/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py
+++ b/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py
@@ -58,4 +58,6 @@ def db_to_form_schema(self):
     def before_map(self, map):
         map.connect('user_dashboard', '/dashboard', controller='ckanext.hdx_orgs.dashboard:DashboardController', action='dashboard',
                   ckan_icon='list')
+        map.connect('organization_bulk_process', '/organization/bulk_process/{org_id}', controller='organization', action='index')
+        map.connect('organization_bulk_process_no_id', '/organization/bulk_process', controller='organization', action='index')
         return map


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Dashboard: Add My Countries back and style like My Organizations
The menu item should be to the right of `My Organisations` and display a list of the countries that the user has followed. 

The list items won't have # of members or the "Your role" line.  See below for a mockup of how it should look (if INNAGO were a country).  Behavior of the datasets count should be the same as on My Organisations (if > 0, blue and linked to country page).  No behavior on followers count.

![image](https://cloud.githubusercontent.com/assets/1654485/3598014/a6b4ddbc-0cdb-11e4-8624-d14aadaddbd9.png)



Discussion:
@cjhendrix - I added back the Countries(groups) as requested and styled them to look as asked. But, the default behaviour of the "My Groups" page is to show the groups that you area a member of. If we want to show the groups that you followed then we need to implement additional functionality. Please tell me if we need to add the "my followed groups" functionality!

Great point. And yes it should be a list of countries that have been followed.    How achievable is that in the current sprint?  We could leave My Countries out of the menu for this sprint and do that work in the next.


Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
@@ -1,3 +1,4 @@
+from ckan.controllers import group
 import ckan.lib.helpers as h
 from ckan.common import (
      c, request
@@ -183,6 +184,15 @@ def hdx_get_extras_element(extras, key='key', value_key='org_url', ret_key='valu
             res = ex[ret_key]
     return res
 
+def hdx_group_followee_list():
+
+    context = {'model': model, 'session': model.Session,
+               'user': c.user or c.author, 'auth_user_obj': c.userobj,
+               'for_view': True}
+
+    list = logic.get_action('group_followee_list')(context, {'id': c.userobj.id})
+    return list
+
 
 def hdx_organizations_available_with_roles():
     organizations_available = h.organizations_available('read')
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
@@ -95,8 +95,8 @@ def get_helpers(self):
             'hdx_linked_user':hdx_helpers.hdx_linked_user,
             'hdx_show_singular_plural':hdx_helpers.hdx_show_singular_plural,
             'hdx_member_roles_list':hdx_helpers.hdx_member_roles_list,
-            'hdx_organizations_available_with_roles':hdx_helpers.hdx_organizations_available_with_roles
-            
+            'hdx_organizations_available_with_roles':hdx_helpers.hdx_organizations_available_with_roles,
+            'hdx_group_followee_list':hdx_helpers.hdx_group_followee_list
         }
         
     def get_actions(self):


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Dashboard: Add My Countries back and style like My Organizations
The menu item should be to the right of `My Organisations` and display a list of the countries that the user has followed. 

The list items won't have # of members or the "Your role" line.  See below for a mockup of how it should look (if INNAGO were a country).  Behavior of the datasets count should be the same as on My Organisations (if > 0, blue and linked to country page).  No behavior on followers count.

![image](https://cloud.githubusercontent.com/assets/1654485/3598014/a6b4ddbc-0cdb-11e4-8624-d14aadaddbd9.png)



Discussion:
@cjhendrix - I added back the Countries(groups) as requested and styled them to look as asked. But, the default behaviour of the "My Groups" page is to show the groups that you area a member of. If we want to show the groups that you followed then we need to implement additional functionality. Please tell me if we need to add the "my followed groups" functionality!

Great point. And yes it should be a list of countries that have been followed.    How achievable is that in the current sprint?  We could leave My Countries out of the menu for this sprint and do that work in the next.

This is displaying also the organization the user follows. My understanding is that the tab should display only the countries the user follows.
Screenshot attached
![1](https://cloud.githubusercontent.com/assets/3865844/3732858/d9b63e4c-1701-11e4-9fce-b9d095147414.jpg)


Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers.py
@@ -191,7 +191,10 @@ def hdx_group_followee_list():
                'for_view': True}
 
     list = logic.get_action('group_followee_list')(context, {'id': c.userobj.id})
-    return list
+    #filter out the orgs
+    groups = [group for group in list if not group['is_organization']]
+
+    return groups
 
 
 def hdx_organizations_available_with_roles():


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Update version number
Sprint 26 will be 0.3.3



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version='v0.3.2'
\ No newline at end of file
+hdx_version='v0.3.3'
\ No newline at end of file


Test patch:
Repository: OCHA-DAP/hdx-ckan

Issue:
Dataset Create: make the Methodology = Other text box multiline
It should work like the description and license = other fields above, including markdown.

Also note some concerns of Dan in #348 

![image](https://cloud.githubusercontent.com/assets/1654485/3507190/81dc55f8-067b-11e4-8d88-6e8088eed5f9.png)

Related Item:  Permission problems on related items
Non-sysadmin (regardless of organization membership) can create related items on any dataset (this is desired), but not edit their own related items (not desired). 

**Checklist**
- The edit button should be visible and working for (and only for):
  - the user who created the related item
  - editors/admins of the organization that the dataset is a part of
- Nose test please

Note also #987 

![image](https://cloud.githubusercontent.com/assets/1654485/3149913/fa6fef20-ea6f-11e3-89c3-8cc91314a5e1.png)



Discussion:
Markup isn't rendering on the dataset view. Reopening: 

![image](https://cloud.githubusercontent.com/assets/1654485/3720816/04a000f0-165a-11e4-905b-791ae74afc35.png)

reopening it:
- textarea is too large
- the tags and caveats are damaged (described in #1063)
- missplace hints for methodology

Screenshot attached
![2](https://cloud.githubusercontent.com/assets/3865844/3732914/85a9dd44-1702-11e4-9f5c-4acf3aa9d275.png)



Resolving patch:
diff --git a/ckan/controllers/related.py b/ckan/controllers/related.py
--- a/ckan/controllers/related.py
+++ b/ckan/controllers/related.py
@@ -175,7 +175,8 @@ def _edit_or_new(self, id, related_id, is_edit):
                     data['id'] = related_id
                 else:
                     data['dataset_id'] = id
-                data['owner_id'] = c.userobj.id
+                    ## FIXED INDENT BUG HDX HACK
+                    data['owner_id'] = c.userobj.id
 
                 related = logic.get_action(action_name)(context, data)
 


Test patch: