SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QC OTA API QCResourceFolderFactory create folder

    How can I create a folder with the QCResourceFolderFactory ??
    when i want to add a item :
    QCResourceFolder testnode = (QCResourceFolder)nodeFac.AddItem(null);
    it throws an the exception : Value does not fall within the expected range.
    So how can I create virtual item ??

  2. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    try:

    QCResourceFolderFactory.AddItem(DBNull.Value)

    it should help

  3. #3
    Junior Member
    Join Date
    Sep 2011
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    I forgot - you should add it to the root folder:

    QCResourceFolder resRoot = TD.QCResourceFolderFactory.Root;
    QCResourceFolder newFolder = resRoot.QCResourceFolderFactory.AddItem(DBNull.Val ue);
    newFolder.ParentId = parentID;
    newFolder.Name = folderName;
    newFolder.Post();

  4. #4
    Junior Member
    Join Date
    Feb 2012
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder


    Hi,

    How can i add the new Release Folder in the "Releases" root folder through QC API.

    y $qcc = shift;
    my $relFolderFact1 = $qcc->ReleaseFolderFactory;
    my $rootReleaseFolder = $relFolderFact1->Root;
    my $relFolderFact2 = $rootReleaseFolder->ReleaseFolderFactory;
    my $release = $relFolderFact2->AddItem("NewRel");
    $release->Post;

  5. #5
    Advanced Member
    Join Date
    Nov 2006
    Posts
    821
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    Sample code for create a Release folder is available in the OTA API documentation. Look at the ReleaseFolderFactory object > "Set up release cycles" example.
    Trudy C
    (Opinions and information contained in this post are wholly my own and do not reflect the opinions of my employer.)

  6. #6
    Junior Member
    Join Date
    Feb 2012
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    Hi,

    Thanks for your reply.

    I used the same example but it is not working as expected. I have written in Perl. In Perl "Null" is not accepted so instead of "Null" i have added the "Release Folder Name". This stratergy works for other API's.

    Can you please help here ?

    sample code :
    my $relFolderFact1 = $qcc->ReleaseFolderFactory;
    my $rootReleaseFolder = $relFolderFact1->Root;
    my $relFolderFact2 = $rootReleaseFolder->ReleaseFolderFactory;
    my $release = $relFolderFact2->AddItem("NewRel");
    #$release->{'Name'} = "NewREL";
    $release->Post;

    Thanks in Advance,

    Best Regards,
    Divya

  7. #7
    Advanced Member
    Join Date
    Nov 2006
    Posts
    821
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    Sorry, I don't know Perl. What error are you getting?
    Trudy C
    (Opinions and information contained in this post are wholly my own and do not reflect the opinions of my employer.)

  8. #8
    Member
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    453
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    Does no one search this forum? This question has been asked before. A poster suggested the following for creating a bug, it should work for any entity.

    my $bg = $bf->AddItem(Win32::OLE::Variant->new(VT_NULL));

    Cheers,
    Brendan.

  9. #9
    Junior Member
    Join Date
    Feb 2012
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QC OTA API QCResourceFolderFactory create folder

    Hi Brendan,

    Thanks for your reply.

    I am getting the below error :

    Bareword "VT_NULL" not allowed while "strict subs" in use at <filename>

    Thanks & Best regards,
    Divya

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:56 AM.

Copyright BetaSoft Inc.