ChangeProjectStatus

Description

This method is used to change the status of the project. The project status is an attribute associated to the project, to manage project workflows more efficiently. 

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
projectIdlongMandatory/Optional*Not relevantThe Id of the project to which the companies are added. Only a user of the company that created the project can execute this method.
projectCodestringMandatory/Optional*Not relevantThe code of the project E.g. ABC0001-A1 
projectStatusIdintMandatoryNot relevantNew status of the project. E.g. If a user wants to close an ongoing project, the  status id "Closed" must be provided here. Valid project statuses are listed below.
applicationNamestringMandatoryShould be less than or equal to 10 charactersThe name of the integration partner.


Note

It is mandatory to provide either the projectCode or the projectId. Preference is given to the projectId, if both the projectCode and the projectId are provided.


Valid project statuses: 

Project status idStatus
1Not Started
2In Progress
3Closed


Project status workflow

Possible project status workflows are listed below:

  1. Not Started -> In Progress -> Closed
  2. Closed -> In Progress
  3. In Progress -> Not Started


Note

Please use the DeleteProject method to change the project status to "Delete". 

Request - sample input

<ChangeProjectStatus>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <projectId>1228</projectId>
    <projectCode isNull="false" />
    <projectStatusId>3</projectStatusId>
    <applicationName>test</applicationName>
  </MethodParameters>
</ChangeProjectStatus>

Response

TypeDescription
ProjectChangeProjectStatus updates the status of the project and returns the project model


Response - sample output

<ChangeProjectStatus>
  <MethodParameters>
    <Project actualtype="Project" basetype="Project">
      <ProjectId>1228</ProjectId>
      <ProjectName>ted</ProjectName>
      <ProjectCode>WAA0002-T2</ProjectCode>
      <ProjectType>0</ProjectType>
      <BoligmappaNumber isNull="true" />
      <IsAdmin>True</IsAdmin>
      <OwnerCompany>
        <Id>197</Id>
        <OrganizationNumber>914350840</OrganizationNumber>
        <CompanyName>VEGA 1 AS Avdeling Admninistrasjon</CompanyName>
        <Address>
          <StreetName>c/o KPMG Accounting AS Sørkedalsveien</StreetName>
          <HouseNumber>6</HouseNumber>
          <HouseLetter isNull="false" />
          <ZipCode>0369</ZipCode>
          <City>Oslo</City>
        </Address>
        <Municipality>OSLO</Municipality>
        <Longitude>10.7117473</Longitude>
        <Latitude>59.9300847</Latitude>
        <ContactPerson isNull="false" />
        <PhoneNumber>23445678</PhoneNumber>
        <Email>hellen@test.no</Email>
        <UseBoligmappa>True</UseBoligmappa>
        <Professions attr0="StringArray" isNull="false">
          <StringArray0>Elektro/tele</StringArray0>
          <StringArray1>Tak/blikkenslager</StringArray1>
        </Professions>
        <MemberAsssociations attr0="StringArray" isNull="false">
          <StringArray0>NELFO</StringArray0>
          <StringArray1>VBL</StringArray1>
        </MemberAsssociations>
        <ContactPersonDetails isNull="true" />
        <CompanyDescription isNull="true" />
        <CompanyWebSite isNull="true" />
        <CompanyLogo isNull="true" />
        <CompanyProfileImage isNull="true" />
        <FacebookAddress isNull="true" />
        <ButtonTextForHelpLink isNull="true" />
        <HelpLink isNull="true" />
        <FranchiserCompanies isNull="true" />
        <EmployeeCount>0</EmployeeCount>
        <LastFinancialStatementSubmissionYear>0</LastFinancialStatementSubmissionYear>
        <IsVatRegistered>False</IsVatRegistered>
        <IsNavaaRegistered>False</IsNavaaRegistered>
        <ShareCapital>0</ShareCapital>
        <Equity>0</Equity>
        <CreditRating isNull="true" />
        <StartBankStatus isNull="true" />
        <Revenue>0</Revenue>
        <Earning>0</Earning>
        <IsNHOAuthorized isNull="true" />
      </OwnerCompany>
      <Description isNull="true" />
      <ProjectStatus>3</ProjectStatus>
      <StartedDate>10/20/2017 2:48:02 PM</StartedDate>
      <UpdatedDate>11/14/2017 3:58:33 PM</UpdatedDate>
      <ProjectCompanies isNull="true" />
      <ProjectAddress isNull="true" />
      <ProjectContactPersonName>hellen tristan</ProjectContactPersonName>
      <ProjectContactPersonEmail>hellen@test.no</ProjectContactPersonEmail>
      <ProjectContactPersonNumber>34343434</ProjectContactPersonNumber>
      <Reference isNull="true" />
    </Project>
  </MethodParameters>
</ChangeProjectStatus>

Exceptions

Error CodeDescription
123An exception occurred while processing your request
138applicationName length has exceeded the maximum character limit allowed (10) 
146The applicationName is not set
167You are not authorized to use this method
223

The given project is not owned by the company or does not exist, therefore this action cannot be performed

252 

No input is provided for projectId or projectCode. Provide the input for at least one of these fields

253 

Ambiguous inputs. Make sure the projectCode and projectId refer to the same project 

254 

Invalid projectCode 

273Project does not exist
287Project status is not provided
288Invalid project status
289Current project status is similar to the input status
290Invalid work flow. A project with the status "Not Started" cannot be moved directly to the "Closed" status
291Invalid work flow. A project with the status "Closed" cannot be moved directly to the "Not Started" status