Opened 4 years ago
Closed 4 years ago
#2628 closed defect (fixed)
Update link to SMTA of ITPGRFA
| Reported by: | Gary Kinard | Owned by: | Kay Kittell |
|---|---|---|---|
| Priority: | minor | Milestone: | Server 2.3.2 |
| Component: | Public Website 2 | Version: | N/A |
| Severity: | Keywords: | ||
| Cc: | karen.kittell@… | Database Engine: | N/A |
| Operating System: | N/A |
Description
Our link to the SMTA is broken.
The new/current link is: https://www.fao.org/3/bc083e/bc083e.pdf
Also suggest that activating this link, as well as the link to the ITPGRFA, open as a new browser session. They currently leave our site.
Lastly, capitalize the t in Treaty in the dialogue box text.
Attachments (1)
Change History (15)
comment:1 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 4 years ago
Steps to reproduce:
1) Navigate to (for example): https://npgsweb.ars-grin.gov/gringlobal/accessiondetail?id=1958009
2) Select the IPR tab.
3) Click the View MTA Disclaimer link.
4) In the text displayed in the modal, the URL http://www.fao.org/3/a-bc083e.pdf resolves, but is incorrect. It should be: https://www.fao.org/3/bc083e/bc083e.pdf
comment:3 by , 4 years ago
Data displayed in modal based on code MTA-SMTA in the ACCESSION_RESTRICTION_TYPE code group.
comment:4 by , 4 years ago
| Cc: | added |
|---|
comment:5 by , 4 years ago
Change made on dev (see attached SQL script). Will be implemented on prod once reviewed.
comment:6 by , 4 years ago
Revision needed. "Treaty" corrected; revised URL not rendering as a URL, while other URL is -- but both are stored in the same format in the database (see below):
This material is covered by The International Treaty on Plant Genetic Resources for Food and Agriculture) (http://www.planttreaty.org) and is therefore distributed under a Standard Material Transfer Agreement (SMTA) (https://www.fao.org/3/bc083e/bc083e.pdf). By accepting shipment of the requested material you are accepting the terms of the SMTA and recognize that your name and contact information (address, phone number, e-mail address) will be submitted as a recipient of this material to the Governing Body of the Treaty.
comment:7 by , 4 years ago
1) Data update (title correction and revised URL) completed and verified on DEV.
2) Changing the URL format(s) to include target="_blank" rel="noopener noreferrer" must be completed in the PW code that generates the modal.
comment:8 by , 4 years ago
Updates:
1) The final version of the corrected text (which also removes an extraneous ")" character) is:
'This material is covered by The International Treaty on Plant Genetic Resources for Food and Agriculture (https://www.fao.org/plant-treaty/en/)
and is therefore distributed under a Standard Material Transfer Agreement (SMTA) (https://www.fao.org/3/bc083e/bc083e.pdf).
By accepting shipment of the requested material you are accepting the terms of the SMTA and recognize that your name and contact information
(address, phone number, e-mail address) will be submitted as a recipient of this material to the Governing Body of the Treaty.'
2) Determined (K. Endress) that the following code in the code-behind of the modal (MTAdisclaimer.aspx.cs) is in fact what renders the HTML markup:
private void bindData(int iprID)
{
using (SecureData sd = new SecureData(false, UserManager.GetLoginToken()))
{
DataTable dt = sd.GetData("web_accessiondetail_ipr_disclaimer", ":accessioniprid=" + iprID, 0, 0).Tables["web_accessiondetail_ipr_disclaimer"];
if (dt.Rows.Count > 0)
{
string description = dt.Rows[0]["description"].ToString();
Regex regx = new Regex("http://([\\w+?\\.\\w+])+([a-zA-Z0-9\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)_\\-\\=\\+\\\\\\/\\?\\.\\:\\;\\'\\,]*)?", RegexOptions.IgnoreCase);
MatchCollection mactches = regx.Matches(description);
foreach (Match match in mactches)
{
string matchURL = match.Value;
if (matchURL.Substring(matchURL.Length - 1, 1) == ")") matchURL = matchURL.Substring(0, matchURL.Length - 1);
if (matchURL.Substring(matchURL.Length - 2, 2) == ").") matchURL = matchURL.Substring(0, matchURL.Length - 2);
description = description.Replace(match.Value, "<a href='" + matchURL + "'>" + match.Value + "</a>");
}
lblDescription.Text = description;
}
}
}
comment:9 by , 4 years ago
Changed the code in MTA disclaimer to include rendering urls as links for https: as well as http: Also corrected the formatting of the links so they do not include the final ) or ). when the link is in parenthesis.
comment:10 by , 4 years ago
Update: decision made to update data immediately, vs. waiting to change/deploy code.
UPDATED TEXT IS BELOW. ADD TO ATTCHED SQL:
This material is covered by The International Treaty on Plant Genetic Resources for Food and Agriculture (http://www.fao.org/plant-treaty/en/) and is therefore distributed under a Standard Material Transfer Agreement (SMTA) (http://www.fao.org/3/bc083e/bc083e.pdf). By accepting shipment of the requested material you are accepting the terms of the SMTA and recognize that your name and contact information (address, phone number, e-mail address) will be submitted as a recipient of this material to the Governing Body of the Treaty.
by , 4 years ago
| Attachment: | Trac_2628.sql added |
|---|
comment:12 by , 4 years ago
| Owner: | changed from to |
|---|
Reassigning. Requested change to URL logic is being addressed in the PW.
comment:13 by , 4 years ago
| Milestone: | → Server 2.3.2 |
|---|---|
| Priority: | major → minor |
| Status: | assigned → addressed |
Changed MTAdisclaimer so the Regex that it uses to turn urls into links includes using https. Previously only looked for http and wouldn't change an https url into a link. This is in coordination with the database field change done by Benjamin for only the 1 record for FAO Standard Material Transfer Agreement description.
comment:14 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | addressed → closed |

The text and the link are in the code_value_lang table. These changes should be made by Benjamin.