Closed jcervantes-sipecom closed 2 years ago
Only active contracts are shown in the dropdown from tickets and it looks like the one in your example has an end date that has passed. Can you confirm that a non-expired contract does show in the list properly from a Ticket?
Hi @cconard96, thanks for your response. You were right, I had selected in "Initial Contract Period" 1 month
Change it to 12 months, I can select it from Ticket:
Just a quick question, so what's the "Initial Contract Period" means? and What's the difference with "Contract renewal period"?
Looking at the documentation (https://glpi-user-documentation.readthedocs.io/fr/latest/modules/management/contract.html),
Initial Contract Period - How long the contract is initially valid for. This is the initial term for the contract. As an example, you have a service contract that last 1 year. It is possible that some contracts may last a different amount of time initially. Contract Renewal Period - Duration after which contract renewal is available Renewal - The type of renewal. A tacit (implied) renewal means that the contact automatically renews. Express renewal represents a contract that both parties must agree on the renewal.
If you have tacit renewal and a renewal period set, the end date should update automatically.
@cconard96 thanks for you explanation very cleared! Yes, I had read the documentation, but I didn't get it, because it just only says: "if this field and start date are given, contract end date will appear, colored in red if contract has expired". What you said is a better explanation of what it field does.
The issue exists having a correct a valid contract period...
In contract,php, function dropdown we have the next code:
if (
$p['nochecklimit']
|| ($data["max_links_allowed"] == 0)
|| ($data["max_links_allowed"] > countElementsInTable(
'glpi_contracts_items',
['contracts_id' => $data['id']]
))
) {
But the table where are the assigned contracts to tickets is "glpi_tickets_contracts"
If you define a project with several renews of contract and associate this contract to a project, this condition (with max_links_allowed = 1) is false
This glpi_contact_items maybe can be the static variable defined in Tickets_contracts.php
Code of Conduct
Is there an existing issue for this?
Version
10.0.0
Bug description
When I try to select a Contract in the Contract tab from an existing Ticket since the Ticket page, the dropdown is showning empty, but I can link the same Ticket from the Ticket tab since the Contract page
Relevant log output
Page URL
/front/ticket.form.php
Steps To reproduce
Your GLPI setup information
Information about system installation and configuration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?