ReleaseOwnership changing State to Saved?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > ReleaseOwnership changing State to Saved?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    ReleaseOwnership changing State to Saved?  
Erik Bailey


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:49 PM

Hi --

The CMS help for ReleaseOwnership states "Releasing ownership on a Posting
will not change its State value. This allows a user to release ownership on
a Posting without taking it out of publication." However, I am finding that
it DOES appear to change the state.

I am trying to make a simple console action to Release Ownership (see code
below). Unfortunately, when the ReleaseOwnership method is called, the State
changes to Saved.

Example:
1) User cmsauthor edits a posting and Submits. Lock is owned by cmsauthor,
and State is WaitingForEditorApproval.
2) cmsauthor clicks the Release Ownership console action.
3) When the ReleaseOwnership method is called, the lock is correctly
released, but the State reverts to Saved (the same is true if a different
user clicks Release Ownership).

I'm running CMS 2002 SP1 (not SP1a). Any thoughts as to what I'm doing
wrong?

Thanks! --Erik

public class ReleaseOwnershipAction : BasePostbackAction
{
private Microsoft.ContentManagement.Publishing.Posting
currentPosting = null;

public ReleaseOwnershipAction()
{
this.Text = "Release Ownership";
currentPosting = CmsHttpContext.Current.Posting;
}

public override bool Available
{
get
{
if (currentPosting != null )
{
return ( !currentPosting.OwnedBy.IsEverybody &&
currentPosting.CanSetProperties);
}
else
{
return false;
}
}
}

public override string ActionJavascript
{
get
{
if (this.Available)
{
return "if (confirm('Release ownership of this
posting?')) { " + base.ActionJavascript + "}";
}
else
{
return "";
}
}
}

protected override void PerformActionBehavior()
{
CmsHttpContext.Current.Posting.ReleaseOwnership(true);
CmsHttpContext.Current.CommitAll();
}
}







[ Post a follow-up to this message ]



    Re: ReleaseOwnership changing State to Saved?  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:49 PM

Hi Erik,

I have seen the same issue before.
I think to get this fixed you will have to open a support case to request a
hotfix.

Cheers
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

MCMS FAQ:
http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Erik Bailey" <ebaileyREVERSEDOMAINS@org.ihi> wrote in message
news:u7hqr1GWEHA.1152@TK2MSFTNGP09.phx.gbl...
> Hi --
>
> The CMS help for ReleaseOwnership states "Releasing ownership on a Posting
> will not change its State value. This allows a user to release ownership
on
> a Posting without taking it out of publication." However, I am finding
that
> it DOES appear to change the state.
>
> I am trying to make a simple console action to Release Ownership (see code
> below). Unfortunately, when the ReleaseOwnership method is called, the
State
> changes to Saved.
>
> Example:
> 1) User cmsauthor edits a posting and Submits. Lock is owned by cmsauthor,
> and State is WaitingForEditorApproval.
> 2) cmsauthor clicks the Release Ownership console action.
> 3) When the ReleaseOwnership method is called, the lock is correctly
> released, but the State reverts to Saved (the same is true if a different
> user clicks Release Ownership).
>
> I'm running CMS 2002 SP1 (not SP1a). Any thoughts as to what I'm doing
> wrong?
>
> Thanks! --Erik
>
>     public class ReleaseOwnershipAction : BasePostbackAction
>     {
>         private Microsoft.ContentManagement.Publishing.Posting
> currentPosting = null;
>
>         public ReleaseOwnershipAction()
>         {
>             this.Text = "Release Ownership";
>             currentPosting = CmsHttpContext.Current.Posting;
>         }
>
>         public override bool Available
>         {
>             get
>             {
>                 if (currentPosting != null )
>                 {
>                     return ( !currentPosting.OwnedBy.IsEverybody &&
> currentPosting.CanSetProperties);
>                 }
>                 else
>                 {
>                     return false;
>                 }
>             }
>         }
>
>         public override string ActionJavascript
>         {
>             get
>             {
>                 if (this.Available)
>                 {
>                     return "if (confirm('Release ownership of this
> posting?')) { " + base.ActionJavascript + "}";
>                 }
>                 else
>                 {
>                     return "";
>                 }
>             }
>         }
>
>         protected override void PerformActionBehavior()
>         {
>             CmsHttpContext.Current.Posting.ReleaseOwnership(true);
>             CmsHttpContext.Current.CommitAll();
>         }
>     }
>
>







[ Post a follow-up to this message ]



    Re: ReleaseOwnership changing State to Saved?  
Erik Bailey


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-17-04 12:52 PM

All --

I'm following up to the newsgroup to let folks know where this stands, in
case other people have the same issue and come across this thread in a
search.

This has been confirmed by Microsoft as a bug in CMS 2002 (it does not
affect CMS 2001). Per Microsoft, "Hotfix was rejected due to the risk to the
entire product in changing this code."

They will be publishing a knowledgebase article on this (the ID will be
873126, although as I write this it has not yet been published).

--Erik Bailey

"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:Ol%23uaUKWEHA.2816@TK2MSFTNGP11.phx.gbl...
> Hi Erik,
>
> I have seen the same issue before.
> I think to get this fixed you will have to open a support case to request
a
> hotfix.
>
> Cheers
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> MCMS FAQ:
>

> MCMS Blog: [url]http://blogs.msdn.com/stefan_gossner/category/4983.aspx" target="_blank">http://download.microsoft.com/downl...egory/4983.aspx
> MCMS Sample Code:
>
http://www.gotdotnet.com/community/...
+Server
> MCMS Whitepapers and other docs:
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
> --------------------------------
>
>
> "Erik Bailey" <ebaileyREVERSEDOMAINS@org.ihi> wrote in message
> news:u7hqr1GWEHA.1152@TK2MSFTNGP09.phx.gbl... 
Posting[vbcol=seagreen] 
> on 
> that 
code[vbcol=seagreen] 
> State 
cmsauthor,[vbcol=seagreen] 
different[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Re: ReleaseOwnership changing State to Saved?  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-17-04 10:50 PM

Hi Erik,

I will chase Kelvin to finish the article asap.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights.

MCMS FAQ:
http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Erik Bailey" <ebaileyREVERSEDOMAINS@org.ihi> wrote in message
news:#D66QoFhEHA.3272@TK2MSFTNGP11.phx.gbl...
> All --
>
> I'm following up to the newsgroup to let folks know where this stands, in
> case other people have the same issue and come across this thread in a
> search.
>
> This has been confirmed by Microsoft as a bug in CMS 2002 (it does not
> affect CMS 2001). Per Microsoft, "Hotfix was rejected due to the risk to
the
> entire product in changing this code."
>
> They will be publishing a knowledgebase article on this (the ID will be
> 873126, although as I write this it has not yet been published).
>
> --Erik Bailey
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:Ol%23uaUKWEHA.2816@TK2MSFTNGP11.phx.gbl... 
request[vbcol=seagreen]
> a 
> rights. 
>
 
>
[url]http://www.gotdotnet.com/community/usersamples/Default.aspx?ProductDropDownList=Content+Management
+Server" target="_blank">http://download.microsoft.com/downl...
+Server 
> Posting 
ownership[vbcol=seagreen] 
> code 
> cmsauthor, 
> different 
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:32 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register