Cannot create a milestone

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
Xavier
Posts: 230
Joined: Tue Mar 01, 2005 5:06 am

Cannot create a milestone

Post by Xavier » Sat Mar 01, 2008 1:34 pm

Hello,

may be it's because of the french locale, but I cannot add a milestone because of the date format:
it only works for mai (may)...
it worked also when entered manually in the dragnet sql tables

if it's : 01-march-2008 or 01-mars-2008 then
"The goal date must be dd-mmm-yyyy."

if it's 01-mar-2008 then
"* The Goal Date is not valid."

only 01-may-2008 worked.

Any idea.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon Mar 03, 2008 10:33 am

I'm not sure if the language makes a difference there or not. I'm going to log it as a bug and get this checked out.

Check your Event Viewer to make sure there isn't a .NET error there as well.

Thanks for the report on this.

Xavier
Posts: 230
Joined: Tue Mar 01, 2005 5:06 am

Post by Xavier » Mon Mar 03, 2008 11:46 am

I tried but nothing in the logs (event viewer either app, security or system).

I must enter 01-MAI-2008 not 01-MAY-2008 to have it work. I guess language makes a difference

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Mon Mar 03, 2008 12:06 pm

Are you using the calendar control or are you manually entering the dates? Try using the calendar. For March it would be 01-mar-2008. Yes the dates do need to be in a specific format be accepted for a milestone. *Most* dates should display according to your locale though.

I will log a feature to make this work better for different locales.
Mary Jo Skrobul
SourceGear

Xavier
Posts: 230
Joined: Tue Mar 01, 2005 5:06 am

Post by Xavier » Mon Mar 03, 2008 12:33 pm

it even fails with the calendar that displays full date:
05-mars-2008

Is it possible to change the "WEB language" without changing the OS language ? how ?

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Mon Mar 03, 2008 12:41 pm

You can try setting the globalization in web.config, but I am not sure if that will help you or not.

http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

This used to work much better. It looks like it was broken in the latest version of Fortress.

For March you need to use: 01-mar-2008, not "mars" and that will get you by.

We will fix this in the next bug fix release which will be out soon.
Mary Jo Skrobul
SourceGear

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Mon Mar 03, 2008 1:47 pm

OK, it seems there is a regular expression validator in the milestone.aspx file that is messing stuff up. There is something you can do now to ease your pain. You should be able to delete the following code out of the milestone.aspx file (by default in c:\inetpub\wwwroot\vaultservice\admin\milestone.aspx) and then the date should ge validated with "our old way"

Code: Select all

	<asp:RegularExpressionValidator ID="RegularExpressionValidatorDate" runat="server" CssClass="error"
						ErrorMessage="<br/>The goal date must be dd-mmm-yyyy."
						ControlToValidate="TextBoxMilestoneDate"
						ValidationExpression="\d{2}-\w{3}-\d{4}"></asp:RegularExpressionValidator>
If you still have problems, you can use numbers instead of a string month after this code is removed (so 1-mars-2008 could be entered as 01-03-2008 or 1-3-08 for example). Any of the following formats should work:
"d-M-yy", "d-M-yyyy", "d-MM-yy", "d-MM-yyyy", "dd-MM-yy", "dd-MM-yyyy", "d-MMM-yyyy", "dd-M-yy", "dd-M-yyyy", "d-MMM-yy", "dd-MMM-yyyy", "dd-MMM-yy"

You can also use " " or "-" or "/" or "," as a separator.
Mary Jo Skrobul
SourceGear

Xavier
Posts: 230
Joined: Tue Mar 01, 2005 5:06 am

Post by Xavier » Tue Mar 04, 2008 2:32 am

I don't if I can attach file, so here is my 'vaultservice/milestone.aspx'
There is no such code.
I've version 1.1 (the latest I guess)

<%@ Page Language="C#" MasterPageFile="AdminMaster.Master" AutoEventWireup="true" CodeBehind="Milestones.aspx.cs" Inherits="VaultService.Admin.Milestones" Title="Milestones" %>
<%@ Register Assembly="VaultWebLib" Namespace="VaultWebLib" TagPrefix="vwl" %>

<asp:Content ID="ContentMilestones" ContentPlaceHolderID="ContentPlaceHolderOnAdminMaster" runat="server">
<vwl:DeluxeMultiView ID="DeluxeMultiViewMilestones" runat="server">
<asp:View ID="ViewMilestones" runat="server">
<div id="divAddLinkTop" runat="server" visible="false">
<div id="adjust" class="adjust">
<span class="button_orange"><a href="Milestone.aspx?pid=<% Response.Write(PID); %>&mid=new">Add</a></span></div></div>
<vwl:GridViewToujours ID="GridViewMilestones" Width="94%" CssClass="listing" runat="server" HeaderStyle-CssClass="tableheader"
AutoGenerateColumns="false" DataSourceID="ObjectDataSourceMilestones" RowStyle-CssClass="list">
<EmptyDataTemplate><div class="emptygridmessage">No milestones exist in this project.</div></EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<a href="Milestone.aspx?pid=<%# Eval("PID") %>&mid=<%# Eval("ID") %>"><%# Eval("Name") %></a></ItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="Goal Date">
<ItemTemplate><%# Eval("GoalDate") %></ItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="Description">
<ItemTemplate><%# Eval("Description") %></ItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="Active">
<ItemTemplate><%# Eval("Active") %></ItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="Delete" Visible="false">
<ItemTemplate>
<a href="Milestones.aspx?pid=<%# Eval("PID") %>&delete=<%# Eval("ID") %>"><img src="../Style/Images/ico_del.gif" alt="Delete" /></a></ItemTemplate></asp:TemplateField>
</Columns></vwl:GridViewToujours></asp:View>
<asp:View ID="ViewConfirmDelete" runat="server">
<div class="interactive">
Are you sure you want to delete the milestone?
<br />
<br />
<asp:Button ID="ButtonDelete_OK" runat="server" Text="Delete" OnClick="ButtonDelete_OK_Click" />
<asp:Button ID="ButtonDelete_Cancel" runat="server" Text="Cancel" OnClick="ButtonDelete_Cancel_Click" /></div></asp:View>
<asp:View ID="ViewFinishedMessage" runat="server">
<div class="interactive">
<asp:Label ID="LabelFinishedMessage" runat="server" EnableViewState="false" />
<br />
<br />
<asp:Button ID="ButtonReturn" runat="server" Text="Return to Milestones Page" OnClick="ButtonReturn_Click" /></div></asp:View>
</vwl:DeluxeMultiView>
<asp:ObjectDataSource ID="ObjectDataSourceMilestones" runat="server" TypeName="VaultWebLib.MilestoneData" SelectMethod="Select" />
</asp:Content>

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Tue Mar 04, 2008 9:24 am

That is the "Milestones.aspx" file.

The code is in the "Milestone.aspx" (no "s") file.
Mary Jo Skrobul
SourceGear

Post Reply