Helpdesk Contact¶
Added in version 3.0.0.
Requires Redmine >= 5.0 and the redmine_expert_helpdesk plugin >= 0.20.0.
Manager¶
All operations on the HelpdeskContact resource are provided by its manager. To get access to it
you have to call redmine.helpdesk_contact where redmine is a configured redmine object.
See the Configuration about how to configure redmine object.
Create methods¶
create¶
- redminelib.managers.ResourceManager.create(**fields)
Creates new HelpdeskContact resource with given fields and saves it to the Helpdesk plugin. Requires the
manage_helpdesk_contactspermission.- Parameters:
project_id (int or string) – (required). Id or identifier of contact’s project.
email (string) – (required). Contact email, unique per project, stored lower-cased.
name (string) – (optional). Contact name.
company (string) – (optional). Company name.
phone (string) – (optional). Phone number.
notes (string) – (optional). Internal notes.
info_request_opt_out (bool) – (optional). Never send completeness check requests to this contact.
- Returns:
Resource object
>>> contact = redmine.helpdesk_contact.create(
... project_id='support',
... email='jane@example.com',
... name='Jane Doe',
... company='ACME'
... )
>>> contact
<redminelib.resources.HelpdeskContact #1 "Jane Doe">
new¶
- redminelib.managers.ResourceManager.new()
Creates new empty HelpdeskContact resource but saves it to the Helpdesk plugin only when
save()is called. Valid attributes are the same as forcreate()method above.- Returns:
Resource object
Read methods¶
get¶
- redminelib.managers.ResourceManager.get(resource_id)
Returns single HelpdeskContact resource from the Helpdesk plugin by its id.
- Parameters:
resource_id (int) – (required). Id of the contact.
- Returns:
Resource object
>>> contact = redmine.helpdesk_contact.get(1)
>>> contact.email
'jane@example.com'
all¶
Not supported by the Helpdesk plugin
filter¶
- redminelib.managers.ResourceManager.filter(**filters)
Returns HelpdeskContact resources that match the given lookup parameters, sorted by name and email.
- Parameters:
project_id (int or string) – (required). Id or identifier of contacts’ project.
email (string) – (optional). Exact, case-insensitive email match, takes precedence over
search.search (string) – (optional). Substring search over name, email and company.
limit (int) – (optional). How much resources to return.
offset (int) – (optional). Starting from what resource to return the other resources.
- Returns:
ResourceSet object
>>> contacts = redmine.helpdesk_contact.filter(project_id='support', search='acme')
>>> contacts
<redminelib.resultsets.ResourceSet object with HelpdeskContact resources>
Update methods¶
update¶
- redminelib.managers.ResourceManager.update(resource_id, **fields)
Updates values of given fields of a HelpdeskContact resource and saves them to the Helpdesk plugin. Accepts the same fields as
create()exceptproject_idandemail, which can’t be changed.- Parameters:
resource_id (int) – (required). Contact id.
- Returns:
True
>>> redmine.helpdesk_contact.update(1, phone='+49 123 456')
True
save¶
- redminelib.resources.HelpdeskContact.save(**attrs)
Saves current state of a HelpdeskContact resource to the Helpdesk plugin.
- Returns:
Resource object
>>> contact = redmine.helpdesk_contact.get(1)
>>> contact.save(company='ACME Corp')
<redminelib.resources.HelpdeskContact #1 "Jane Doe">
Delete methods¶
delete¶
- redminelib.managers.ResourceManager.delete(resource_id)
Deletes single HelpdeskContact resource from the Helpdesk plugin by its id.
- Parameters:
resource_id (int) – (required). Contact id.
- Returns:
True
>>> redmine.helpdesk_contact.delete(1)
True
Export¶
Not supported by the Helpdesk plugin