Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

not able to understand visibility checkout and retire Ui action

chandan31
Tera Contributor

Hi All,

 

Can you please explain me visibility condition checkout ui action  : (!(new KBCommon().isStackNameDialog()) && (new KBCommon().isVersioningEnabled()) && (new KBVersioning().canCheckout(current))) , retire :!(new KBCommon().isStackNameDialog()) && (new KBKnowledge().canRetire(current)) && (new KBCommon().canProvideReplacementArticle()) && (current.sys_class_name != 'kb_knowledge_block').

 

These two are ui action but i am not able to understand the script .

 

Thanks and Regards,

chandan

1 ACCEPTED SOLUTION

Kieran Anson
Kilo Patron

For checkout, the UI action will be displayed if:

  • Versioning is enabled
  • The following is evaluated in the canCheckout function
    • is not an external article
    • is a valid version (not empty)
    • is a published article
    • hasn't been checked out
    • is a member or manager of the ownership group, if the ownership group is defined
    • Is the knowledge base owner
    • Is one of the knowledge base managers
    • If ownership group is empty, if the user meets the user criteria of 'can contribute'

 

For retirement

  • is the latest version
  • is published
  • is a member or manager of the ownership group, if the ownership group is defined
  • Is the knowledge base owner
  • Is one of the knowledge base managers
  • If ownership group is empty, if the user meets the user criteria of 'can contribute'
  • Is the last revisor
  • Is the original author

View solution in original post

1 REPLY 1

Kieran Anson
Kilo Patron

For checkout, the UI action will be displayed if:

  • Versioning is enabled
  • The following is evaluated in the canCheckout function
    • is not an external article
    • is a valid version (not empty)
    • is a published article
    • hasn't been checked out
    • is a member or manager of the ownership group, if the ownership group is defined
    • Is the knowledge base owner
    • Is one of the knowledge base managers
    • If ownership group is empty, if the user meets the user criteria of 'can contribute'

 

For retirement

  • is the latest version
  • is published
  • is a member or manager of the ownership group, if the ownership group is defined
  • Is the knowledge base owner
  • Is one of the knowledge base managers
  • If ownership group is empty, if the user meets the user criteria of 'can contribute'
  • Is the last revisor
  • Is the original author