Custom type won't approve

View: New views
12 Messages — Rating Filter:   Alert me  

Custom type won't approve

by Phil Kemp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings,

I have a custom type that extends="farcry.core.packages.types.versions" and everything seems ok. It has the option to approve this myself or to request approval. But when I approve a draft object, it's status gets updated to ... draft! I thought that to get the versioning working I just needed to have the right extends, is there something else?

Cheers,
-Phil

Re: Custom type won't approve

by modius :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 22, 6:10 pm, Phil Kemp <philipbk...@...> wrote:
> I have a custom type that extends="farcry.core.packages.types.versions" and
> everything seems ok. It has the option to approve this myself or to request
> approval. But when I approve a draft object, it's status gets updated to ...
> draft! I thought that to get the versioning working I just needed to have
> the right extends, is there something else?

Can you post the code for the custom type?

-- geoff
http://www.daemon.com.au/
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by Phil Kemp () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

<cfcomponent name="newsletter" extends="farcry.core.packages.types.versions" output="false" displayname="Newsletter">

<cfproperty name="issue" type="string" default="" hint="Issue" ftLabel="Issue" ftWizardStep="Overview" ftFieldSet="General" ftSeq="1"
                        ftValidation="required-length" />
<cfproperty name="period" type="string" default="" hint="Period" ftLabel="Period" ftWizardStep="Overview" ftFieldSet="General" ftSeq="2"
                        ftValidation="required-length" />
<cfproperty name="aSections" type="array" default="" hint="Sections" ftLabel="Sections" ftWizardStep="Overview" ftFieldSet="Sections"
                        ftSeq="3" ftJoin="dmNewsletterSection" ftAllowLibraryAddNew="false" />
<cfproperty ftSeq="611" ftWizardStep="Report" ftFieldSet="Overview" ftLabel="Report Document"
                                default="" hint="Report Document" name="report" type="string" ftValidation="required"
                                ftType="file" ftDestination="/files/newsletter/" />
<cfproperty name="specialcontent" type="longchar" default="" hint="Content" ftLabel="Content" ftWizardStep="Special" ftFieldSet="Content"
                        ftSeq="4" ftType="richtext" />
       
</cfcomponent>

EDIT: It's version 5-1-1 on Oracle if that makes any difference

Re: Custom type won't approve

by Tomek Kott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Phil,

1) probably not your problem, but check to make sure that your ftSeq is not overwriting the "status" property.

2) Try moving the property with ftSeq="611" to the very end, or at least making the ftSeq things consecutive with your properties. I've found that problems in ftSeq can cascade down in very odd ways!

Tomek

On Mon, Jun 22, 2009 at 8:12 AM, Phil Kemp <philipbkemp@...> wrote:


<cfcomponent name="newsletter" extends="farcry.core.packages.types.versions"
output="false" displayname="Newsletter">

<cfproperty name="issue" type="string" default="" hint="Issue"
ftLabel="Issue" ftWizardStep="Overview" ftFieldSet="General" ftSeq="1"
                       ftValidation="required-length" />
<cfproperty name="period" type="string" default="" hint="Period"
ftLabel="Period" ftWizardStep="Overview" ftFieldSet="General" ftSeq="2"
                       ftValidation="required-length" />
<cfproperty name="aSections" type="array" default="" hint="Sections"
ftLabel="Sections" ftWizardStep="Overview" ftFieldSet="Sections"
                       ftSeq="3" ftJoin="dmNewsletterSection" ftAllowLibraryAddNew="false" />
<cfproperty ftSeq="611" ftWizardStep="Report"           ftFieldSet="Overview"
ftLabel="Report Document"
                               default=""      hint="Report Document"          name="report"                   type="string"
ftValidation="required"
                               ftType="file" ftDestination="/files/newsletter/" />
<cfproperty name="specialcontent" type="longchar" default="" hint="Content"
ftLabel="Content" ftWizardStep="Special" ftFieldSet="Content"
                       ftSeq="4" ftType="richtext" />

</cfcomponent>
--
View this message in context: http://www.nabble.com/Custom-type-won%27t-approve-tp24143221s621p24146223.html
Sent from the FarCry - Dev mailing list archive at Nabble.com.





--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by Phil Kemp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I didn't even notice that the ftSeq was out of order! I'll check and see if changing it makes any difference

How would the ftSeq overwrite the status property? How can I avoid it?

-Phil

Tomek Kott wrote:
Phil,

1) probably not your problem, but check to make sure that your ftSeq is not
overwriting the "status" property.

2) Try moving the property with ftSeq="611" to the very end, or at least
making the ftSeq things consecutive with your properties. I've found that
problems in ftSeq can cascade down in very odd ways!

Tomek

Re: Custom type won't approve

by Tomek Kott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Phil,

for the status property you would just need to check if there is a ftSeq associated with that property in farcry.core.packages.types.versions.cfc. If there isn't, you're all set. (I am pretty sure that it doesn't, but doesn't hurt to check).

Tomek

On Wed, Jun 24, 2009 at 3:36 AM, Phil Kemp <philipbkemp@...> wrote:


I didn't even notice that the ftSeq was out of order! I'll check and see if
changing it makes any difference

How would the ftSeq overwrite the status property? How can I avoid it?

-Phil


Tomek Kott wrote:
>
> Phil,
>
> 1) probably not your problem, but check to make sure that your ftSeq is
> not
> overwriting the "status" property.
>
> 2) Try moving the property with ftSeq="611" to the very end, or at least
> making the ftSeq things consecutive with your properties. I've found that
> problems in ftSeq can cascade down in very odd ways!
>
> Tomek
>
--
View this message in context: http://www.nabble.com/Custom-type-won%27t-approve-tp24143221s621p24180057.html
Sent from the FarCry - Dev mailing list archive at Nabble.com.





--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by Phil Kemp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found the solution.

In the FarCry core code, there is a clause which translates to "if the label field is emtpy, don't do workflow action". My type definition didn't have a label property and hence, no workflow actions.

Re: Custom type won't approve

by Tomek Kott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

didn't know that, and that's good to know! Glad you got it fixed.

Tomek

On Thu, Jun 25, 2009 at 8:34 AM, Phil Kemp <philipbkemp@...> wrote:


I found the solution.

In the FarCry core code, there is a clause which translates to "if the label
field is emtpy, don't do workflow action". My type definition didn't have a
label property and hence, no workflow actions.
--
View this message in context: http://www.nabble.com/Custom-type-won%27t-approve-tp24143221s621p24202393.html
Sent from the FarCry - Dev mailing list archive at Nabble.com.





--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by Marco van den Oever :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


That is indeed good to know, i am wondering, isn't there a way that
these kind of stuff is more clear to debug? So if there  is something
missing that should be there there is a sort of checker / error
reporter that tels you there's something missing.

That shouldn't be to hard and save a lot of time and frustration.

Idea?

http://bugs.farcrycms.org/browse/FC-1904

On Jun 25, 5:29 pm, Tomek Kott <tkott.s...@...> wrote:

> didn't know that, and that's good to know! Glad you got it fixed.
>
> Tomek
>
> On Thu, Jun 25, 2009 at 8:34 AM, Phil Kemp <philipbk...@...> wrote:
>
> > I found the solution.
>
> > In the FarCry core code, there is a clause which translates to "if the
> > label
> > field is emtpy, don't do workflow action". My type definition didn't have a
> > label property and hence, no workflow actions.
> > --
> > View this message in context:
> >http://www.nabble.com/Custom-type-won%27t-approve-tp24143221s621p2420...
> > Sent from the FarCry - Dev mailing list archive at Nabble.com.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by Tomek Kott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The issue wasn't that the label property wasn't deployed, but that it was empty (null string). At least, that's how I understood it. Those are two different issues, and the empty-ness issue I would imagine is much harder to debug. In the end, simply setting "bAutoLabel" (component wise) or "bLabel"  (for a property) would solve that issue. Check the actual names, but those two tags can be used in FC to specify the label.

Tomek

On Thu, Jun 25, 2009 at 11:43 AM, Marco van den Oever <marcovandenoever@...> wrote:

That is indeed good to know, i am wondering, isn't there a way that
these kind of stuff is more clear to debug? So if there  is something
missing that should be there there is a sort of checker / error
reporter that tels you there's something missing.

That shouldn't be to hard and save a lot of time and frustration.

Idea?

http://bugs.farcrycms.org/browse/FC-1904

On Jun 25, 5:29 pm, Tomek Kott <tkott.s...@...> wrote:
> didn't know that, and that's good to know! Glad you got it fixed.
>
> Tomek
>
> On Thu, Jun 25, 2009 at 8:34 AM, Phil Kemp <philipbk...@...> wrote:
>
> > I found the solution.
>
> > In the FarCry core code, there is a clause which translates to "if the
> > label
> > field is emtpy, don't do workflow action". My type definition didn't have a
> > label property and hence, no workflow actions.
> > --
> > View this message in context:
> >http://www.nabble.com/Custom-type-won%27t-approve-tp24143221s621p2420...
> > Sent from the FarCry - Dev mailing list archive at Nabble.com.
>
>



--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by Marco van den Oever :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


You're right, and you can't go and create "what if" code for every
situation, still i think when something is causing such problem it
should be more obvious on what is going on.

On Jun 25, 6:17 pm, Tomek Kott <tkott.s...@...> wrote:

> The issue wasn't that the label property wasn't deployed, but that it was
> empty (null string). At least, that's how I understood it. Those are two
> different issues, and the empty-ness issue I would imagine is much harder to
> debug. In the end, simply setting "bAutoLabel" (component wise) or "bLabel"
> (for a property) would solve that issue. Check the actual names, but those
> two tags can be used in FC to specify the label.
>
> Tomek
>
> On Thu, Jun 25, 2009 at 11:43 AM, Marco van den Oever <
>
> marcovandenoe...@...> wrote:
>
> > That is indeed good to know, i am wondering, isn't there a way that
> > these kind of stuff is more clear to debug? So if there  is something
> > missing that should be there there is a sort of checker / error
> > reporter that tels you there's something missing.
>
> > That shouldn't be to hard and save a lot of time and frustration.
>
> > Idea?
>
> >http://bugs.farcrycms.org/browse/FC-1904
>
> > On Jun 25, 5:29 pm, Tomek Kott <tkott.s...@...> wrote:
> > > didn't know that, and that's good to know! Glad you got it fixed.
>
> > > Tomek
>
> > > On Thu, Jun 25, 2009 at 8:34 AM, Phil Kemp <philipbk...@...>
> > wrote:
>
> > > > I found the solution.
>
> > > > In the FarCry core code, there is a clause which translates to "if the
> > > > label
> > > > field is emtpy, don't do workflow action". My type definition didn't
> > have a
> > > > label property and hence, no workflow actions.
> > > > --
> > > > View this message in context:
> > > >http://www.nabble.com/Custom-type-won%27t-approve-tp24143221s621p2420.
> > ..
> > > > Sent from the FarCry - Dev mailing list archive at Nabble.com.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Custom type won't approve

by modius :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 25, 10:34 pm, Phil Kemp <philipbk...@...> wrote:
> In the FarCry core code, there is a clause which translates to "if the label
> field is emtpy, don't do workflow action". My type definition didn't have a
> label property and hence, no workflow actions.

I suspect this is some legacy code to prevent incomplete objects from
passing through to approved -- it might be more helpful if the code
actually through an error explaining the problem ;)

Please raise an issue at http://bugs.farcrycms.org/ and copy in the
offending code snippet (noting the filename and farcry core version)
-- and I'll see if I can't prioritise a fix for that.

On a related note, the label should always be filled in. The framework
looks for a bunch of likely candidates by default -- things like
title, name and so on.  But you can nominate any property or
combination of properties to be the label by simply using the
blabel="true" attribute for a cfproperty:
http://docs.farcrycms.org/display/FCDEV40/Form+Tool+Property+Metadata

-- geoff
http://www.daemon.com.au/
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---