It was brought to my attention that on Database and client - DOORS 9v2 patch 2 - that the share function does not work as intended. So I gave it a go
- here is what we are trying to do:
1 - make a module shareable at Level 1 - then lock a lower level object and it does lock all objects up to Level 1 - no problems
2 - make the same module shareable at Level 3 - then lock a lower level object and it does lock all objects upto Level 3 - no problems
3 - now return to task 1 - make the same module shareable at Level 1 - then lock a lower level object and it does ONLY LOCK that object !
Now then, patch 3 for this DOORS version was meant to fix this - I tried it and it does not fix this - should that be a concern for all - or do I miss something here?
SystemAdmin - Sun Apr 11 21:05:58 EDT 2010 |
|
Re: Shareable Edit not working ? SpaceApe - Mon Apr 12 08:59:36 EDT 2010
Check whether the object mentioned in step 1 and 3 is a level 3 object. If yes, what you see in step 3 is a normal behavior.
Try running a DXL, Prior to step 3, to (re)set access rights for all objects as inherited. The result of step 3 should then be identical to that of step 1.
|
|
Re: Shareable Edit not working ? llandale - Mon Apr 12 18:13:43 EDT 2010
I didn't check but suspect the tool does not erase previous sections. You can see where your sections are by inserting the following code into a column as Layout DXL:
bool IsInherit
isAccessInherited(obj, IsInherit)
if (IsInherit) //-
then display("")
else display("Shared Section")
|
|
Re: Shareable Edit not working ? SystemAdmin - Mon Apr 12 20:24:27 EDT 2010 llandale - Mon Apr 12 18:13:43 EDT 2010
I didn't check but suspect the tool does not erase previous sections. You can see where your sections are by inserting the following code into a column as Layout DXL:
bool IsInherit
isAccessInherited(obj, IsInherit)
if (IsInherit) //-
then display("")
else display("Shared Section")
definately, the objects are at a different level - hence this discussion
thanks for the code snippet - it does show what the tool does - or does not do - it does not apply the the 'inherit form parent' correctly - to me it seems a bit 'buggy' - that you should run a script before applying shared access, should that not be handled by the 'Setup for Sharing' script from the tools menu?>
next part of the test now is to actually do create a script to apply inherited access, re-run the 'Setup for Sharing' and see whether this resolves the issue.
thanks for all your comments and efforts
|
|
Re: Shareable Edit not working ? sdauphin - Tue Apr 13 11:08:30 EDT 2010 SystemAdmin - Mon Apr 12 20:24:27 EDT 2010
definately, the objects are at a different level - hence this discussion
thanks for the code snippet - it does show what the tool does - or does not do - it does not apply the the 'inherit form parent' correctly - to me it seems a bit 'buggy' - that you should run a script before applying shared access, should that not be handled by the 'Setup for Sharing' script from the tools menu?>
next part of the test now is to actually do create a script to apply inherited access, re-run the 'Setup for Sharing' and see whether this resolves the issue.
thanks for all your comments and efforts
I am also impacted by this issue. Will it be fixed in a near future ?
wernerK : did you manage to workaround the problem with your script ? Would you be willing to share it, please ?
Best regards,
Servanne.
|
|
Re: Shareable Edit not working ? llandale - Tue Apr 13 12:44:11 EDT 2010
This will do it. Modify value of "DesiredLevel" to be the level of headings and higher that are to be Shared Sections. e.g. DesiredLevel = 3 means make all headings level 1, 2, and 3 Shared Sections, everything is not.
The script resets sections as needed, doesn't matter what the state of the current module is.
Presumes full write access to the module.
// Following buffer is local to fIsHead() Buffer gl_bufIsHeadNum = create(32)
//*********************** bool fIsHead(Object obj)
{
// Does DOORS consider the object a 'Heading' object?
// Heading Objects are those that display the paragraph number in the Main column in DOORS
// DOORS considerations for determining 'Heading Objects':
// [a] Objects that contain some non-null rich Heading text.
// [b] Objects that have no non-null rich Object Text and no Pictures (i.e. empty objects)
// [c] However, Cell, row header, and table header objects are NEVER headings,
// even when they contain Object Heading or are empty.
// [d] Note that invisible rich-text markup only is considered.
// This function looks at the Paragraph number of the object to determine if
// DOORS considers it a Heading.
// Notes:
// [1] Normal Text Object Paragraph Numbers have a ZeroDash and look like this: "3.2.1.0-4".
// Notice there is a dash after the last period.
// [2] Normal Headings Numbers have no dash and look like: "3.2.1".
// [3] When a Heading is (incorrectly) a child of a Text Object, its Para looks like this:
// "3.2.1.0-4.2"; notice there is a period after the last dash.
// [4] Level 1 Headings paragraphs have no dashes nor periods, and look like "1".
// [5] Level 1 Text paragraphs have no periods, but do contain a dash, and look like "0-1".
// [6] Objects in tables (cell, row, table) have para numbers like nested text objects: "3-2.0-1.0-1".
// This function would correctly identifies them as Text without an explicit check,
// but to save time and string table space a specific table-row-cell check is made.
// Strategy: Get the paragraph 'number' of the object.
// If its in a table its not a Heading
// If it contains no dash then its a heading.
// If it has a dash but there is a period following the last dash, then its a heading.
// Otherwise (there's a dash with no period after it) then its not a Heading object.
if (
null obj)
return(
false)
int LocDash, LocDashLast, LocDashNext, LocPeriod
// Locations in the paragraph number
if (row(obj) or table(obj) or cell(obj))
return(
false)
// Table-Row-Cell objects are not Headings. gl_bufIsHeadNum = number(obj)
// Put the Paragraph in the buffer LocDash = contains(gl_bufIsHeadNum,
'-', 0)
if (LocDash < 0)
return(
true)
// No dashes at all, must be a heading (e.g. "2" or "3.2.1")
// Find the last dash in the Paragraph Number LocDashLast = LocDash LocDashNext = LocDash
while (LocDashNext > 0)
{ LocDashNext = contains(gl_bufIsHeadNum,
'-', LocDashLast+1)
// print "\t" tempStringOf(gl_bufIsHeadNum) "\t" LocDash "\t" LocDashNext "\n"
if (LocDashNext > 0) LocDashLast = LocDashNext
}
// Find any period after the last dash: LocPeriod = contains(gl_bufIsHeadNum,
'.', LocDashLast+1)
// print "fIsHead\t" (stringOf(gl_bufIsHeadNum)) "\t" LocDash "\t" LocPeriod "\n"
return(LocPeriod > LocDashLast)
// Its a heading if there's a period after the last Dash
}
// end fIsHead()
// ============== MAIN ==============
int DesiredLevel = 2
// Level of Headings to make Sections Object obj bool IsInherited
for obj in entire (current Module)
do
{ isAccessInherited(obj, IsInherited)
if (level(obj) > DesiredLevel or !fIsHead(obj))
//- then
{
if(!IsInherited) inherited(obj)
// Object low or is a Text object:
}
else
{
if( IsInherited) specific(obj)
// Object high and Heading
}
}
|
|
Re: Shareable Edit not working ? llandale - Tue Apr 13 12:46:28 EDT 2010 llandale - Tue Apr 13 12:44:11 EDT 2010
This will do it. Modify value of "DesiredLevel" to be the level of headings and higher that are to be Shared Sections. e.g. DesiredLevel = 3 means make all headings level 1, 2, and 3 Shared Sections, everything is not.
The script resets sections as needed, doesn't matter what the state of the current module is.
Presumes full write access to the module.
// Following buffer is local to fIsHead() Buffer gl_bufIsHeadNum = create(32)
//*********************** bool fIsHead(Object obj)
{
// Does DOORS consider the object a 'Heading' object?
// Heading Objects are those that display the paragraph number in the Main column in DOORS
// DOORS considerations for determining 'Heading Objects':
// [a] Objects that contain some non-null rich Heading text.
// [b] Objects that have no non-null rich Object Text and no Pictures (i.e. empty objects)
// [c] However, Cell, row header, and table header objects are NEVER headings,
// even when they contain Object Heading or are empty.
// [d] Note that invisible rich-text markup only is considered.
// This function looks at the Paragraph number of the object to determine if
// DOORS considers it a Heading.
// Notes:
// [1] Normal Text Object Paragraph Numbers have a ZeroDash and look like this: "3.2.1.0-4".
// Notice there is a dash after the last period.
// [2] Normal Headings Numbers have no dash and look like: "3.2.1".
// [3] When a Heading is (incorrectly) a child of a Text Object, its Para looks like this:
// "3.2.1.0-4.2"; notice there is a period after the last dash.
// [4] Level 1 Headings paragraphs have no dashes nor periods, and look like "1".
// [5] Level 1 Text paragraphs have no periods, but do contain a dash, and look like "0-1".
// [6] Objects in tables (cell, row, table) have para numbers like nested text objects: "3-2.0-1.0-1".
// This function would correctly identifies them as Text without an explicit check,
// but to save time and string table space a specific table-row-cell check is made.
// Strategy: Get the paragraph 'number' of the object.
// If its in a table its not a Heading
// If it contains no dash then its a heading.
// If it has a dash but there is a period following the last dash, then its a heading.
// Otherwise (there's a dash with no period after it) then its not a Heading object.
if (
null obj)
return(
false)
int LocDash, LocDashLast, LocDashNext, LocPeriod
// Locations in the paragraph number
if (row(obj) or table(obj) or cell(obj))
return(
false)
// Table-Row-Cell objects are not Headings. gl_bufIsHeadNum = number(obj)
// Put the Paragraph in the buffer LocDash = contains(gl_bufIsHeadNum,
'-', 0)
if (LocDash < 0)
return(
true)
// No dashes at all, must be a heading (e.g. "2" or "3.2.1")
// Find the last dash in the Paragraph Number LocDashLast = LocDash LocDashNext = LocDash
while (LocDashNext > 0)
{ LocDashNext = contains(gl_bufIsHeadNum,
'-', LocDashLast+1)
// print "\t" tempStringOf(gl_bufIsHeadNum) "\t" LocDash "\t" LocDashNext "\n"
if (LocDashNext > 0) LocDashLast = LocDashNext
}
// Find any period after the last dash: LocPeriod = contains(gl_bufIsHeadNum,
'.', LocDashLast+1)
// print "fIsHead\t" (stringOf(gl_bufIsHeadNum)) "\t" LocDash "\t" LocPeriod "\n"
return(LocPeriod > LocDashLast)
// Its a heading if there's a period after the last Dash
}
// end fIsHead()
// ============== MAIN ==============
int DesiredLevel = 2
// Level of Headings to make Sections Object obj bool IsInherited
for obj in entire (current Module)
do
{ isAccessInherited(obj, IsInherited)
if (level(obj) > DesiredLevel or !fIsHead(obj))
//- then
{
if(!IsInherited) inherited(obj)
// Object low or is a Text object:
}
else
{
if( IsInherited) specific(obj)
// Object high and Heading
}
}
Actually, it should set all object to be Inherited, then set Specific the headings of choice. This will force the Objects to inherit the current Module's accesses. As it is, a level 1 heading will remain a shared section, but will retain whatever accesses it used to have.
I guess you could erase them all setting DesiredLevel = 0, run script, then set it to 3 and run it again.
|
|
Re: Shareable Edit not working ? SystemAdmin - Tue Apr 13 23:02:31 EDT 2010 llandale - Tue Apr 13 12:46:28 EDT 2010
Actually, it should set all object to be Inherited, then set Specific the headings of choice. This will force the Objects to inherit the current Module's accesses. As it is, a level 1 heading will remain a shared section, but will retain whatever accesses it used to have.
I guess you could erase them all setting DesiredLevel = 0, run script, then set it to 3 and run it again.
Hi - all
Thanks to Louie's script DOORS Shareable function - in DOORS9v2 - become workable again (it works in 9v1 but not in later versions. and or patches...)
Fantastic - thanks a lot - I started writing similar code yesterday afternoon, did not finish it and to my (pleasant) surprise, Louie posted this script for us.
I tested it all around and it does make it all work as Louie described it. The part to set it back to zero is a step which one could leave out, it works without, but to be 100% certain, one should run it.
Thanks a million.
Werner
|
|
Re: Shareable Edit not working ? llandale - Wed Apr 14 12:05:01 EDT 2010 SystemAdmin - Tue Apr 13 23:02:31 EDT 2010
Hi - all
Thanks to Louie's script DOORS Shareable function - in DOORS9v2 - become workable again (it works in 9v1 but not in later versions. and or patches...)
Fantastic - thanks a lot - I started writing similar code yesterday afternoon, did not finish it and to my (pleasant) surprise, Louie posted this script for us.
I tested it all around and it does make it all work as Louie described it. The part to set it back to zero is a step which one could leave out, it works without, but to be 100% certain, one should run it.
Thanks a million.
Werner
The clever part is the fIsHead() function, which accurately determines whether DOORS thinks its a heading. This includes empty objects, which DOORS (inexplicably) displays as Headings.
The previous version of that function attempted to apply rules to determine the object's Heading status (not null Head; null Text including no Picture nor OLE, no residual invisible RT formattng in Text, ...), but the rules changes a little so I re-wrote the function to be more effecient and more accurate.
|
|