Skip to content

Commit

Permalink
Merge pull request #1 from FCSCOpendata/fix/review-feedback
Browse files Browse the repository at this point in the history
 Auto assign issue to dataset creator and issue tab hidden for non editor users.
  • Loading branch information
MuhammadIsmailShahzad authored Jun 13, 2022
2 parents 92b76e1 + d1b56b1 commit 3ed9d70
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions ckanext/issues/logic/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def issue_create_schema():
return {
'title': [not_missing],
'description': [ignore_missing],
'assignee_id': [ignore_missing, user_exists],
'dataset_id': [not_missing, package_exists, as_package_id],
}

Expand Down
2 changes: 1 addition & 1 deletion ckanext/issues/templates/issues/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div class="form-actions">

<button class="btn btn-primary" type="submit" name="save" tabindex="4">{{ _('Create') }}</button>
<button class="btn btn-primary" type="submit" name="save" tabindex="4">{{ _('Submit Comment') }}</button>
</div>
</form>

Expand Down
2 changes: 1 addition & 1 deletion ckanext/issues/templates/package/read_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block content_primary_nav %}
{{ super() }}
{% if h.issues_enabled(pkg) %}
{% if h.issues_enabled(pkg) and h.check_access('package_update', {'id':pkg.id }) %}
{{ h.build_nav_icon('issues.dataset', _('Issues'), dataset_id=pkg.name) }}
{% endif %}
{% endblock %}
3 changes: 2 additions & 1 deletion ckanext/issues/views/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def new(dataset_id, resource_id=None):
# logic.parse_params(request.params))))
data_dict.update({
'title': request.form.get('title'),
'description': request.form.get('description')
'description': request.form.get('description'),
'assignee_id': dataset_dict['creator_user_id']
})

if not data_dict['title']:
Expand Down

0 comments on commit 3ed9d70

Please sign in to comment.